Package 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.io.FileDeleteStrategy
FileDeleteStrategy.ForceFileDeleteStrategy
-
-
Field Summary
-
Fields inherited from class org.apache.commons.io.FileDeleteStrategy
FORCE, NORMAL
-
-
Constructor Summary
Constructors Constructor Description ForceFileDeleteStrategy()
Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
doDelete(java.io.File fileToDelete)
Deletes the file object.-
Methods inherited from class org.apache.commons.io.FileDeleteStrategy
delete, deleteQuietly, toString
-
-
-
-
Method Detail
-
doDelete
protected boolean doDelete(java.io.File fileToDelete) throws java.io.IOException
Deletes the file object.This implementation uses
FileUtils.forceDelete()
if the file exists.- Overrides:
doDelete
in classFileDeleteStrategy
- Parameters:
fileToDelete
- the file to delete, not null- Returns:
- Always returns
true
- Throws:
java.lang.NullPointerException
- if the file is nulljava.io.IOException
- if an error occurs during file deletion
-
-