org.apache.wicket.util.file
Class FolderDeleteStrategy

java.lang.Object
  extended by org.apache.wicket.util.file.FileDeleteStrategy
      extended by org.apache.wicket.util.file.FolderDeleteStrategy

public class FolderDeleteStrategy
extends FileDeleteStrategy

A FileDeleteStrategy that can delete folders.


Field Summary
 
Fields inherited from class org.apache.wicket.util.file.FileDeleteStrategy
NORMAL
 
Constructor Summary
protected FolderDeleteStrategy()
          Construct.
 
Method Summary
 void delete(java.io.File folder)
          Deletes the file object, which may be a file or a directory.
 boolean deleteQuietly(java.io.File folder)
          Deletes the file object, which may be a file or a directory.
 
Methods inherited from class org.apache.wicket.util.file.FileDeleteStrategy
doDelete, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FolderDeleteStrategy

protected FolderDeleteStrategy()
Construct.

Parameters:
name -
Method Detail

deleteQuietly

public boolean deleteQuietly(java.io.File folder)
Description copied from class: FileDeleteStrategy
Deletes the file object, which may be a file or a directory. All IOExceptions are caught and false returned instead. If the file does not exist or is null, true is returned.

Subclass writers should override FileDeleteStrategy.doDelete(File), not this method.

Overrides:
deleteQuietly in class FileDeleteStrategy
Parameters:
folder - the file to delete, null returns true
Returns:
true if the file was deleted, or there was no such file

delete

public void delete(java.io.File folder)
            throws java.io.IOException
Description copied from class: FileDeleteStrategy
Deletes the file object, which may be a file or a directory. If the file does not exist, the method just returns.

Subclass writers should override FileDeleteStrategy.doDelete(File), not this method.

Overrides:
delete in class FileDeleteStrategy
Parameters:
folder - the file to delete, not null
Throws:
java.io.IOException - if an error occurs during file deletion


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.