Class DirectoryPathTree

All Implemented Interfaces:
OpenPathTree, PathTree, Closeable, Serializable, AutoCloseable

public class DirectoryPathTree extends OpenContainerPathTree implements Serializable
See Also:
  • Constructor Details

    • DirectoryPathTree

      public DirectoryPathTree()
      For deserialization
    • DirectoryPathTree

      public DirectoryPathTree(Path dir)
    • DirectoryPathTree

      public DirectoryPathTree(Path dir, PathFilter pathFilter)
    • DirectoryPathTree

      public DirectoryPathTree(Path dir, PathFilter pathFilter, boolean manifestEnabled)
    • DirectoryPathTree

      protected DirectoryPathTree(Path dir, PathFilter pathFilter, PathTreeWithManifest pathTreeWithManifest)
  • Method Details

    • isArchiveOrigin

      public boolean isArchiveOrigin()
      Description copied from interface: PathTree
      Whether the content of this tree comes from an archive or not.

      This is useful for instance when you want to determine if the resources can be updated in dev mode.

      Specified by:
      isArchiveOrigin in interface PathTree
    • getRootPath

      protected Path getRootPath()
      Description copied from class: OpenContainerPathTree
      This is the path to the container.

      In the case of a zip archive, it's the path to the root of the archive (i.e. a ZipPath). In the case of a directory, it's the directory.

      Should be used for any read operation on the container.

      Specified by:
      getRootPath in class OpenContainerPathTree
    • getContainerPath

      protected Path getContainerPath()
      Description copied from class: OpenContainerPathTree
      This is the path to the container.

      In the case of a zip archive, it's the path of the archive. In the case of a directory, it's the directory.

      Should only be used for equals/hashCode.

      Specified by:
      getContainerPath in class OpenContainerPathTree
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface OpenPathTree
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getOriginalTree

      public PathTree getOriginalTree()
      Specified by:
      getOriginalTree in interface OpenPathTree