Package net.sourceforge.jnlp.cache
Class CacheDirectory
- java.lang.Object
-
- net.sourceforge.jnlp.cache.CacheDirectory
-
public final class CacheDirectory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINFO_SUFFIX
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancleanDir(java.io.File root)Removes empty folders in the current directory.static voidcleanParent(DirectoryNode fileNode)This will recursively remove the parent folders if they are empty.static voidgetDirStructure(DirectoryNode root)Get the structure of directory for keeping track of the protocol and domain.static java.util.ArrayList<DirectoryNode>getLeafData(DirectoryNode root)Get all the leaf nodes.
-
-
-
Field Detail
-
INFO_SUFFIX
public static final java.lang.String INFO_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDirStructure
public static void getDirStructure(DirectoryNode root)
Get the structure of directory for keeping track of the protocol and domain.- Parameters:
root- Location of cache directory.
-
getLeafData
public static java.util.ArrayList<DirectoryNode> getLeafData(DirectoryNode root)
Get all the leaf nodes.- Parameters:
root- The point where we want to start getting the leafs.- Returns:
- An ArrayList of DirectoryNode.
-
cleanDir
public static boolean cleanDir(java.io.File root)
Removes empty folders in the current directory.- Parameters:
root- File pointing at the beginning of directory.- Returns:
- True if something was deleted.
-
cleanParent
public static void cleanParent(DirectoryNode fileNode)
This will recursively remove the parent folders if they are empty.- Parameters:
fileNode- node of file which parent is going to be cleaned
-
-