Class FileSystem


  • public class FileSystem
    extends java.lang.Object
    An abstraction of a file system. A file system can be a zip, or a directory.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSystem()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IDirectory getFSRoot​(java.io.File fs)
      This method gets the IDirectory that represents the root of a virtual file system.
      static ICloseableDirectory getFSRoot​(java.io.InputStream is)
      This method gets an ICloseableDirectory that represents the root of a virtual file system.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileSystem

        public FileSystem()
    • Method Detail

      • getFSRoot

        public static IDirectory getFSRoot​(java.io.File fs)
        This method gets the IDirectory that represents the root of a virtual file system. The provided file can either identify a directory, or a zip file.
        Parameters:
        fs - the zip file.
        Returns:
        the root of the virtual FS.
      • getFSRoot

        public static ICloseableDirectory getFSRoot​(java.io.InputStream is)
        This method gets an ICloseableDirectory that represents the root of a virtual file system. The provided InputStream should represent a zip file. When this ICloseableDirectory is closed then backing resources will be cleaned up.
        Parameters:
        is - An input stream to a zip file.
        Returns:
        the root of the virtual FS.