Package org.apache.aries.util.filesystem
Class FileSystem
java.lang.Object
org.apache.aries.util.filesystem.FileSystem
An abstraction of a file system. A file system can be a zip, or a directory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IDirectoryThis method gets the IDirectory that represents the root of a virtual file system.static ICloseableDirectorygetFSRoot(InputStream is) This method gets an ICloseableDirectory that represents the root of a virtual file system.
-
Constructor Details
-
FileSystem
public FileSystem()
-
-
Method Details
-
getFSRoot
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
This method gets an ICloseableDirectory that represents the root of a virtual file system. The provided InputStream should represent a zip file. When thisICloseableDirectoryis closed then backing resources will be cleaned up.- Parameters:
is- An input stream to a zip file.- Returns:
- the root of the virtual FS.
-