Class ZipResource

    • Constructor Detail

      • ZipResource

        public ZipResource​(String zipFile,
                           String entry)
        Instantiates a new Zip resource.
        Parameters:
        zipFile - the zip file
        entry - the entry
    • Method Detail

      • baseName

        public String baseName()
        Description copied from interface: Resource
        Gets the name (file name or directory name) of this resource.
        Specified by:
        baseName in interface Resource
        Overrides:
        baseName in class BaseResource
        Returns:
        The name of the file or directory
      • exists

        public boolean exists()
        Description copied from interface: Resource
        Exists boolean.
        Specified by:
        exists in interface Resource
        Returns:
        True if the resource exists, False if the resource does not exist.
      • getChild

        public Resource getChild​(String relativePath)
        Description copied from interface: Resource

        Creates a new Resource that is relative to this resource.

        Specified by:
        getChild in interface Resource
        Parameters:
        relativePath - The relative path for the new resource.
        Returns:
        A new resource that is relative to this resource.
      • getChildren

        public List<Resource> getChildren​(Pattern pattern,
                                          boolean recursive)
        Description copied from interface: Resource

        Lists all the resources that are directly under this resource.

        Specified by:
        getChildren in interface Resource
        Parameters:
        pattern - The file matching pattern
        recursive - Gets all children recursively
        Returns:
        A list of all the resources one level under this resource.
      • getParent

        public Resource getParent()
        Description copied from interface: Resource
        Gets parent.
        Specified by:
        getParent in interface Resource
        Returns:
        The parent resource (directory for file, parent directory for a directory)