Package weka.gui.scripting
Class ScriptUtils
java.lang.Object
weka.gui.scripting.ScriptUtils
A helper class for Script related stuff.
- Version:
- $Revision: 8034 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Copies the file/directory (recursively).static String
Tries to load the file and return its content.static void
Moves the file/directory (recursively).static boolean
Saves the content to a file.
-
Constructor Details
-
ScriptUtils
public ScriptUtils()
-
-
Method Details
-
copy
Copies the file/directory (recursively).- Parameters:
sourceLocation
- the source file/dirtargetLocation
- the target file/dir- Throws:
IOException
- if copying fails
-
move
Moves the file/directory (recursively).- Parameters:
sourceLocation
- the source file/dirtargetLocation
- the target file/dir- Throws:
IOException
- if moving fails
-
save
Saves the content to a file.- Parameters:
file
- the file to save tocontent
- the content to save- Returns:
- true if successfully saved
-
load
Tries to load the file and return its content.- Parameters:
file
- the file to open- Returns:
- the content, otherwise null
-