wcs
Class RmTask

java.lang.Object
  extended by wcs.Task
      extended by wcs.ProcessTask
          extended by wcs.RmTask
All Implemented Interfaces:
Runnable

public class RmTask
extends ProcessTask

task to delete files and directory trees. BUG: this should not use ProcessTask.


Nested Class Summary
 
Nested classes/interfaces inherited from class wcs.Task
Task.Exception, Task.In, Task.Out
 
Field Summary
protected  ArrayList nodes
          nodes to be removed.
 
Fields inherited from class wcs.ProcessTask
argv
 
Fields inherited from class wcs.Task
env, err, in, out
 
Constructor Summary
RmTask(Task.Out err, Properties env)
          required properties: rm delete command
 
Method Summary
 void addToNodes(File node)
          add a node to be removed.
static void main(String[] argv)
          test: run commandline with system properties.
 void run()
          append nodes to ProcessTask.argv, delegate to base method.
 
Methods inherited from class wcs.ProcessTask
run
 
Methods inherited from class wcs.Task
In, In, In, Out, Out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodes

protected final ArrayList nodes
nodes to be removed.

Constructor Detail

RmTask

public RmTask(Task.Out err,
              Properties env)
required properties:
rm delete command

Method Detail

addToNodes

public void addToNodes(File node)
                throws IOException
add a node to be removed.

Throws:
IOException

run

public void run()
         throws Task.Exception
append nodes to ProcessTask.argv, delegate to base method.

Specified by:
run in interface Runnable
Overrides:
run in class ProcessTask
Throws:
Task.Exception

main

public static void main(String[] argv)
                 throws Exception
test: run commandline with system properties.

Throws:
Exception