com.faunos.util.io.file
Class DirectoryRemover
java.lang.Object
com.faunos.util.io.file.DirectoryRemover
public class DirectoryRemover
- extends Object
Recursively removes the contents of a directory tree.
Similar to rm myDir -rf.
Warning!
This class performs an inherently dangerous operation: it
removes any directory tree. Be very careful how
you call this code. As a small security measure, this class
provides a global (i.e. static) minimum depth from root parameter
that is initialized to 3.
- Author:
- Babak Farhang
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryRemover
public DirectoryRemover()
getMinDepthFromRoot
public static int getMinDepthFromRoot()
setMinDepthFromRoot
public static void setMinDepthFromRoot(int minDepth)
removeTree
public static boolean removeTree(File root)