Class FSFile

    • Constructor Detail

      • FSFile

        public FSFile()
    • Method Detail

      • equals

        public boolean equals​(FSFile file)
        Checks if this file equals another file. Compares using path.
        Parameters:
        file - the other file.
        Returns:
        true if equal, false if not.
      • getName

        public abstract String getName()
        Returns:
        the name of this file in the file system.
      • getPath

        public abstract String getPath()
        Returns:
        the path of this file from the root of the system.
      • length

        public abstract long length()
        Returns:
        the length of this file in bytes.
      • getDate

        public abstract long getDate()
        Returns:
        the date that this file was created/modified.
      • getInputStream

        public abstract InputStream getInputStream()
                                            throws IOException
        Returns an InputStream of a file within this wrapped file so that it may be read via a stream.
        Returns:
        an InputStream that can read the file, or null if the path refers to a location that is not inside this file.
        Throws:
        IOException - if acquiring the stream throws an exception.