org.apache.commons.io
Class FileDeleteStrategy.ForceFileDeleteStrategy
java.lang.Object
|
+--org.apache.commons.io.FileDeleteStrategy
|
+--org.apache.commons.io.FileDeleteStrategy.ForceFileDeleteStrategy
- Enclosing class:
- FileDeleteStrategy
- static class FileDeleteStrategy.ForceFileDeleteStrategy
- extends FileDeleteStrategy
Force file deletion strategy.
Method Summary |
protected boolean |
doDelete(File fileToDelete)
Deletes the file object. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
FileDeleteStrategy.ForceFileDeleteStrategy
FileDeleteStrategy.ForceFileDeleteStrategy()
- Default Constructor
doDelete
protected boolean doDelete(File fileToDelete)
throws IOException
- Deletes the file object.
This implementation uses FileUtils.forceDelete()
if the file exists.
- Overrides:
doDelete
in class FileDeleteStrategy
- Parameters:
fileToDelete
- the file to delete, not null- Returns:
- Always returns
true
- Throws:
NullPointerException
- if the file is nullIOException
- if an error occurs during file deletion