net.sf.tomp.xtcl.command
Class Cd

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.VarCommand
          extended by net.sf.tomp.xtcl.command.FileCommand
              extended by net.sf.tomp.xtcl.command.Cd
All Implemented Interfaces:
Command

public class Cd
extends FileCommand

Changes the working (current) directory.

Author:
tomp

Field Summary
 
Fields inherited from class net.sf.tomp.xtcl.command.FileCommand
fileName
 
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand
var
 
Constructor Summary
Cd()
           
 
Method Summary
 int execute(Context context)
          Changes the working (current) directory.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class net.sf.tomp.xtcl.command.FileCommand
getFile, setFile
 
Methods inherited from class net.sf.tomp.xtcl.command.VarCommand
setVar
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cd

public Cd()
Method Detail

execute

public int execute(Context context)
            throws java.lang.Exception
Changes the working (current) directory.

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
context - is asked for the working directory, working dir is set to the new one.
Returns:
0 (OK) if the dir exists, 1 otherwise
Throws:
java.lang.Exception - DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.