org.hecl.files
Class FileCmds

java.lang.Object
  extended by org.hecl.Operator
      extended by org.hecl.files.FileCmds
All Implemented Interfaces:
Command

public class FileCmds
extends Operator

The FileCmds class implements various file commands - most importantly, open, but also various operations to check whether a file exists, is readable, is a directory, and so on.

Version:
1.0
Author:
David N. Welton

Field Summary
static int ABSPATH
           
static int CANONPATH
           
static int CD
           
static int CURRENTFILE
           
static int DELETE
           
static int DU
           
static int EXISTS
           
static int FILEJOIN
           
static int FILESPLIT
           
static int GETCWD
           
static int HIDDEN
           
static int ISABSOLUTE
           
static int ISDIRECTORY
           
static int ISOPEN
           
static int LIST
           
static int LISTROOTS
           
static int MKDIR
           
static int MTIME
           
static int NAME
           
static int OPEN
           
static int PATH
           
static int READABLE
           
static int RENAME
           
static int SIZE
           
static int SOCKET
           
static int SOURCE
           
static int TRUNCATE
           
static int WRITABLE
           
 
Fields inherited from class org.hecl.Operator
cmdcode, maxargs, minargs
 
Constructor Summary
protected FileCmds(int cmdcode, int minargs, int maxargs)
           
 
Method Summary
static void load(Interp ip)
           
 Thing operate(int cmd, Interp interp, Thing[] argv)
          The operate method dispatches to the actual code.
static void unload(Interp ip)
           
 
Methods inherited from class org.hecl.Operator
cmdCode, load, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPEN

public static final int OPEN
See Also:
Constant Field Values

SOCKET

public static final int SOCKET
See Also:
Constant Field Values

READABLE

public static final int READABLE
See Also:
Constant Field Values

WRITABLE

public static final int WRITABLE
See Also:
Constant Field Values

HIDDEN

public static final int HIDDEN
See Also:
Constant Field Values

EXISTS

public static final int EXISTS
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

SIZE

public static final int SIZE
See Also:
Constant Field Values

NAME

public static final int NAME
See Also:
Constant Field Values

PATH

public static final int PATH
See Also:
Constant Field Values

ABSPATH

public static final int ABSPATH
See Also:
Constant Field Values

CANONPATH

public static final int CANONPATH
See Also:
Constant Field Values

ISABSOLUTE

public static final int ISABSOLUTE
See Also:
Constant Field Values

MTIME

public static final int MTIME
See Also:
Constant Field Values

ISDIRECTORY

public static final int ISDIRECTORY
See Also:
Constant Field Values

ISOPEN

public static final int ISOPEN
See Also:
Constant Field Values

LIST

public static final int LIST
See Also:
Constant Field Values

MKDIR

public static final int MKDIR
See Also:
Constant Field Values

RENAME

public static final int RENAME
See Also:
Constant Field Values

TRUNCATE

public static final int TRUNCATE
See Also:
Constant Field Values

LISTROOTS

public static final int LISTROOTS
See Also:
Constant Field Values

DU

public static final int DU
See Also:
Constant Field Values

FILESPLIT

public static final int FILESPLIT
See Also:
Constant Field Values

FILEJOIN

public static final int FILEJOIN
See Also:
Constant Field Values

SOURCE

public static final int SOURCE
See Also:
Constant Field Values

CURRENTFILE

public static final int CURRENTFILE
See Also:
Constant Field Values

CD

public static final int CD
See Also:
Constant Field Values

GETCWD

public static final int GETCWD
See Also:
Constant Field Values
Constructor Detail

FileCmds

protected FileCmds(int cmdcode,
                   int minargs,
                   int maxargs)
Method Detail

operate

public Thing operate(int cmd,
                     Interp interp,
                     Thing[] argv)
              throws HeclException
Description copied from class: Operator
The operate method dispatches to the actual code.

Specified by:
operate in class Operator
Parameters:
cmd - an int value
interp - an Interp value
argv - a Thing[] value
Returns:
a Thing value, or null when no value has been
Throws:
HeclException - if an error occurs

load

public static void load(Interp ip)
                 throws HeclException
Throws:
HeclException

unload

public static void unload(Interp ip)
                   throws HeclException
Throws:
HeclException