Package org.marketcetera.util.file
Class Deleter.RecursiveDeleter
- java.lang.Object
-
- org.apache.commons.io.DirectoryWalker<String>
-
- org.marketcetera.util.file.SmartLinksDirectoryWalker
-
- org.marketcetera.util.file.Deleter.RecursiveDeleter
-
- Enclosing class:
- Deleter
private static final class Deleter.RecursiveDeleter extends SmartLinksDirectoryWalker
ASmartLinksDirectoryWalkerthat does not follow symbolic links, and deletes all files it traverses.
-
-
Constructor Summary
Constructors Constructor Description RecursiveDeleter()Creates a new recursive deleter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyUnwrap(File file)Deletes the given file.protected voidhandleDirectoryEnd(File directory, int depth, Collection<String> results)Deletes the given directory.protected voidhandleFile(File file, int depth, Collection<String> results)Deletes the given file.-
Methods inherited from class org.marketcetera.util.file.SmartLinksDirectoryWalker
apply, apply, apply, apply, getFollowLinks, handleDirectory
-
-
-
-
Method Detail
-
handleDirectoryEnd
protected void handleDirectoryEnd(File directory, int depth, Collection<String> results) throws IOException
Deletes the given directory.- Overrides:
handleDirectoryEndin classorg.apache.commons.io.DirectoryWalker<String>- Throws:
IOException- See Also:
DirectoryWalker#handleDirectoryEnd(File,int,Collection)
-
handleFile
protected void handleFile(File file, int depth, Collection<String> results) throws IOException
Deletes the given file.- Overrides:
handleFilein classorg.apache.commons.io.DirectoryWalker<String>- Throws:
IOException- See Also:
DirectoryWalker#handleFile(File,int,Collection)
-
applyUnwrap
public void applyUnwrap(File file) throws I18NException
Deletes the given file.- Parameters:
file- The file.- Throws:
I18NException- Thrown if an I/O error occurs.
-
-