Class CacheDirectory

java.lang.Object
net.sourceforge.jnlp.cache.CacheDirectory

public final class CacheDirectory extends Object
  • Field Details

  • Method Details

    • 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 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(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