public class ScriptUtils extends Object
Constructor and Description |
---|
ScriptUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(File sourceLocation,
File targetLocation)
Copies the file/directory (recursively).
|
static String |
load(File file)
Tries to load the file and return its content.
|
static void |
move(File sourceLocation,
File targetLocation)
Moves the file/directory (recursively).
|
static boolean |
save(File file,
String content)
Saves the content to a file.
|
public static void copy(File sourceLocation, File targetLocation) throws IOException
sourceLocation
- the source file/dirtargetLocation
- the target file/dirIOException
- if copying failspublic static void move(File sourceLocation, File targetLocation) throws IOException
sourceLocation
- the source file/dirtargetLocation
- the target file/dirIOException
- if moving failspublic static boolean save(File file, String content)
file
- the file to save tocontent
- the content to saveCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.