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.
  • Constructor Details

    • ForceFileDeleteStrategy

      ForceFileDeleteStrategy()
      Default Constructor
  • Method Details

    • 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 null
      IOException - if an error occurs during file deletion