uvascript
Class Shell

java.lang.Object
  extended byuvascript.Shell

public class Shell
extends java.lang.Object

Utilities for file manipulation.


Constructor Summary
Shell()
           
 
Method Summary
 void copyFile(java.lang.String src, java.lang.String dest)
          Copies a file.
 Editor edit(java.lang.String name)
          Opens a text file for read and write mode.
 boolean exists(java.lang.String name)
          Returns true if the specified file exists.
 boolean makeDir(java.lang.String name)
          Makes a directory.
 TextReader readOpen(java.lang.String name)
          Opens a file with the text-read mode.
 boolean remove(java.lang.String name)
          Delete a file or a directory (like rm -r).
 boolean rename(java.lang.String oldName, java.lang.String newName)
          Renames a file.
 TextWriter writeOpen(java.lang.String name)
          Opens a file with the text-write mode.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shell

public Shell()
Method Detail

makeDir

public boolean makeDir(java.lang.String name)
Makes a directory.


copyFile

public void copyFile(java.lang.String src,
                     java.lang.String dest)
Copies a file.

Parameters:
src - source file.
dest - destination file.

rename

public boolean rename(java.lang.String oldName,
                      java.lang.String newName)
Renames a file.

Returns:
true if and only if the renaming succeeded; false otherwise.

remove

public boolean remove(java.lang.String name)
Delete a file or a directory (like rm -r).

Returns:
false if some files or directories cannot be removed.

exists

public boolean exists(java.lang.String name)
Returns true if the specified file exists.

Parameters:
name - specifies the file name.

readOpen

public TextReader readOpen(java.lang.String name)
Opens a file with the text-read mode.

Returns:
null if the file cannot be opened.

writeOpen

public TextWriter writeOpen(java.lang.String name)
Opens a file with the text-write mode.

Returns:
null if the file cannot be opened.

edit

public Editor edit(java.lang.String name)
Opens a text file for read and write mode.



UvaScript. Copyright (C) 2004 Shigeru Chiba. All Rights Reserved.