public class DeleteJob extends Object implements Callable<Integer>, 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 |
---|---|
Integer |
call() |
protected void |
deleteFile(File fileToDelete) |
int |
getDirCount() |
int |
getErrorCount() |
int |
getFileCount() |
File[] |
getFiles()
Get the files.
|
int |
getLogEvery() |
int |
getMaxErrors() |
String |
getName()
Get the name.
|
boolean |
isForce()
Getter for force property.
|
boolean |
isReallyRoot() |
protected boolean |
isRoot(File fileToDelete) |
void |
reset() |
void |
setFiles(File[] files)
Set the files.
|
void |
setForce(boolean force)
Setter for force property.
|
void |
setLogEvery(int logEvery) |
void |
setMaxErrors(int maxErrors) |
void |
setName(String name)
Set the name
|
void |
setReallyRoot(boolean reallyRoot) |
String |
toString() |
public Integer call() throws IOException, InterruptedException
call
in interface Callable<Integer>
IOException
InterruptedException
protected void deleteFile(File fileToDelete) throws IOException
IOException
protected boolean isRoot(File fileToDelete) throws IOException
IOException
public void reset()
public String getName()
public void setName(String name)
name
- The name.public File[] getFiles()
public void setFiles(File[] 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)