Class ClasspathArchive


  • public class ClasspathArchive
    extends FSFileArchive
    This is an FS wrapping class for wrapping a classpath tree in the filesystem. There only needs to be only one of these in the FS stack, as this refers to the Java Environment classpath inclusion.
    Author:
    Matthew Tropiano
    • Constructor Detail

      • ClasspathArchive

        public ClasspathArchive()
        Creates the entry point into the classpath.
    • Method Detail

      • canCreateFiles

        public boolean canCreateFiles()
        Description copied from class: FSFileArchive
        Can this archive create a new file within itself?
        Specified by:
        canCreateFiles in class FSFileArchive
        Returns:
        true if it can, false if it is read-only.
      • createFile

        public OutputStream createFile​(String path)
                                throws IOException
        Description copied from class: FSFileArchive
        Creates a file in this archive using the name and path provided.
        Specified by:
        createFile in class FSFileArchive
        Parameters:
        path - the path of the file to create.
        Returns:
        an acceptable OutputStream for filling the file with data.
        Throws:
        IOException - if a read error occurs during the fetch.
      • getAllFiles

        public FSFile[] getAllFiles()
                             throws IOException
        Description copied from class: FSFileArchive
        Retrieves all of the files within this object as FSFile objects.
        Specified by:
        getAllFiles in class FSFileArchive
        Returns:
        an array of FSFiles, each entry representing a particular file in this object.
        Throws:
        IOException - if a read error occurs during the fetch.
      • getAllFiles

        public FSFile[] getAllFiles​(FSFileFilter filter)
                             throws IOException
        Description copied from class: FSFileArchive
        Retrieves all of the files within this object that pass the filter test as FSFile objects.
        Specified by:
        getAllFiles in class FSFileArchive
        Parameters:
        filter - the file filter to use.
        Returns:
        an array of FSFiles, each entry representing a particular file in this object.
        Throws:
        IOException - if a read error occurs during the fetch.
      • getAllFilesInDir

        public FSFile[] getAllFilesInDir​(String path)
                                  throws IOException
        Description copied from class: FSFileArchive
        Retrieves all of the files within a directory as FSFile objects.
        Specified by:
        getAllFilesInDir in class FSFileArchive
        Parameters:
        path - the abstract path of a directory inside this file.
        Returns:
        an array of FSFiles, each entry representing a particular file in this object.
        Throws:
        IOException - if a read error occurs during the fetch.
      • getAllFilesInDir

        public FSFile[] getAllFilesInDir​(String path,
                                         FSFileFilter filter)
                                  throws IOException
        Description copied from class: FSFileArchive
        Retrieves all of the files within this object as FSFile objects that pass the filter test.
        Specified by:
        getAllFilesInDir in class FSFileArchive
        Parameters:
        path - the abstract path of a directory inside this file.
        filter - the file filter to use.
        Returns:
        an array of FSFiles, each entry representing a particular file in this object.
        Throws:
        IOException - if a read error occurs during the fetch.
      • getFile

        public FSFile getFile​(String path)
        Description copied from class: FSFileArchive
        Returns an FSFile reference of a file within this wrapped file.
        Specified by:
        getFile in class FSFileArchive
        Parameters:
        path - the abstract path of a file inside this file.
        Returns:
        a new reference to the file requested, or null if the path refers to a location that is not inside this file.