uk.ac.soton.itinnovation.grid.utils
Class ScriptUtils
java.lang.Object
uk.ac.soton.itinnovation.grid.utils.ScriptUtils
public class ScriptUtils
- extends Object
Utility methods for handling scripts.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptUtils
public ScriptUtils()
getScript
public static File getScript(File dir,
String prefix)
throws FileNotFoundException
- Get a script from a directory.
- Parameters:
dir - directory to searchprefix - prefix of script
- Returns:
- the single script starting with the prefix
- Throws:
FileNotFoundException - if no such file exists or multiple files match
splitArguments
public static String[] splitArguments(String arguments)
- Parse a string into an array of arguments.
This method copes with quoted strings and backslash escapes.
- Parameters:
arguments - the string to parse
- Returns:
- an array of arguments
Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.