org.apache.wicket.util.file
Class FolderDeleteStrategy
java.lang.Object
org.apache.wicket.util.file.FileDeleteStrategy
org.apache.wicket.util.file.FolderDeleteStrategy
public class FolderDeleteStrategy
- extends FileDeleteStrategy
A FileDeleteStrategy
that can delete folders.
Method Summary |
void |
delete(File folder)
Deletes the file object, which may be a file or a directory. |
boolean |
deleteQuietly(File folder)
Deletes the file object, which may be a file or a directory. |
FolderDeleteStrategy
protected FolderDeleteStrategy()
- Construct.
- Parameters:
name
-
deleteQuietly
public boolean deleteQuietly(File folder)
- Description copied from class:
FileDeleteStrategy
- Deletes the file object, which may be a file or a directory. All
IOException
s
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(File folder)
throws 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:
IOException
- if an error occurs during file deletion
Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.