public class ScriptUtils
extends java.lang.Object
| Constructor and Description |
|---|
ScriptUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(java.io.File sourceLocation,
java.io.File targetLocation)
Copies the file/directory (recursively).
|
static java.lang.String |
load(java.io.File file)
Tries to load the file and return its content.
|
static void |
move(java.io.File sourceLocation,
java.io.File targetLocation)
Moves the file/directory (recursively).
|
static boolean |
save(java.io.File file,
java.lang.String content)
Saves the content to a file.
|
public static void copy(java.io.File sourceLocation,
java.io.File targetLocation)
throws java.io.IOException
sourceLocation - the source file/dirtargetLocation - the target file/dirjava.io.IOException - if copying failspublic static void move(java.io.File sourceLocation,
java.io.File targetLocation)
throws java.io.IOException
sourceLocation - the source file/dirtargetLocation - the target file/dirjava.io.IOException - if moving failspublic static boolean save(java.io.File file,
java.lang.String content)
file - the file to save tocontent - the content to savepublic static java.lang.String load(java.io.File file)
file - the file to open