public class DeleteJob
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Integer>, java.io.Serializable
Unless the force property is set, this job will cause an exception if an attempt is made to delete a non empty directory.
<oddjob id="this"> <job> <delete id="delete"> <files> <files files="${this.args[0]}/*"/> </files> </delete> </job> </oddjob>
Constructor and Description |
---|
DeleteJob() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
call() |
protected void |
deleteFile(java.io.File fileToDelete) |
int |
getDirCount() |
int |
getErrorCount() |
int |
getFileCount() |
java.io.File[] |
getFiles()
Get the files.
|
int |
getLogEvery() |
int |
getMaxErrors() |
java.lang.String |
getName()
Get the name.
|
boolean |
isForce()
Getter for force property.
|
boolean |
isReallyRoot() |
protected boolean |
isRoot(java.io.File fileToDelete) |
void |
reset() |
void |
setFiles(java.io.File[] files)
Set the files.
|
void |
setForce(boolean force)
Setter for force property.
|
void |
setLogEvery(int logEvery) |
void |
setMaxErrors(int maxErrors) |
void |
setName(java.lang.String name)
Set the name
|
void |
setReallyRoot(boolean reallyRoot) |
java.lang.String |
toString() |
public java.lang.Integer call() throws java.io.IOException, java.lang.InterruptedException
call
in interface java.util.concurrent.Callable<java.lang.Integer>
java.io.IOException
java.lang.InterruptedException
protected void deleteFile(java.io.File fileToDelete) throws java.io.IOException
java.io.IOException
protected boolean isRoot(java.io.File fileToDelete)
public void reset()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name.public java.io.File[] getFiles()
public void setFiles(java.io.File[] files)
files
- The files.public boolean isForce()
public void setForce(boolean force)
force
- The force property.public void setLogEvery(int logEvery)
public int getLogEvery()
public void setReallyRoot(boolean reallyRoot)
public boolean isReallyRoot()
public int getFileCount()
public int getDirCount()
public int getErrorCount()
public int getMaxErrors()
public void setMaxErrors(int maxErrors)
public java.lang.String toString()
toString
in class java.lang.Object