Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.gui.scripting
Class ScriptUtils

    java.lang.Object
      weka.gui.scripting.ScriptUtils

    public class ScriptUtils

extends java.lang.Object

A helper class for Script related stuff.

Version:
  $Revision: 5928 $
Author:
  fracpete (fracpete at waikato dot ac dot nz)

Constructor Summary
`ScriptUtils()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ScriptUtils

    public ScriptUtils()

Method Detail

### copy

    public static void copy(java.io.File sourceLocation,
                            java.io.File targetLocation)
                     throws java.io.IOException

  Copies the file/directory (recursively).

  Parameters:
    `sourceLocation` - the source file/dir
    `targetLocation` - the target file/dir
  Throws:
    `java.io.IOException` - if copying fails

### move

    public static void move(java.io.File sourceLocation,
                            java.io.File targetLocation)
                     throws java.io.IOException

  Moves the file/directory (recursively).

  Parameters:
    `sourceLocation` - the source file/dir
    `targetLocation` - the target file/dir
  Throws:
    `java.io.IOException` - if moving fails

### save

    public static boolean save(java.io.File file,
                               java.lang.String content)

  Saves the content to a file.

  Parameters:
    `file` - the file to save to
    `content` - the content to save
  Returns:
    true if successfully saved

### load

    public static java.lang.String load(java.io.File file)

  Tries to load the file and return its content.

  Parameters:
    `file` - the file to open
  Returns:
    the content, otherwise null

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD