Class ZeroFs
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Logger(package private) static final FileSystemProviderThe system-loaded instance ofSystemZeroFsFileSystemProvider, ornullif it could not be found or loaded.static final StringThe URI scheme for the ZeroFs file system ("zerofs"). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static FileSystemProviderReturns the system-loaded instance ofSystemZeroFsFileSystemProviderornullif it could not be found or loaded.static FileSystemCreates a new in-memory file system with a default configuration appropriate to the current operating system.static FileSystemnewFileSystem(Configuration configuration) Creates a new in-memory file system with the given configuration.static FileSystemnewFileSystem(String name) Creates a new in-memory file system with a default configuration appropriate to the current operating system.static FileSystemnewFileSystem(String name, Configuration configuration) Creates a new in-memory file system with the given configuration.(package private) static FileSystemnewFileSystem(URI uri, Configuration config) private static String
-
Field Details
-
URI_SCHEME
The URI scheme for the ZeroFs file system ("zerofs").- See Also:
-
LOGGER
-
systemProvider
The system-loaded instance ofSystemZeroFsFileSystemProvider, ornullif it could not be found or loaded.
-
-
Constructor Details
-
ZeroFs
private ZeroFs()
-
-
Method Details
-
newFileSystem
Creates a new in-memory file system with a default configuration appropriate to the current operating system.More specifically, if the operating system is Windows,
Configuration.windows()is used; if the operating system is Mac OS X,Configuration.osX()is used; otherwise,Configuration.unix()is used. -
newFileSystem
Creates a new in-memory file system with a default configuration appropriate to the current operating system.More specifically, if the operating system is Windows,
Configuration.windows()is used; if the operating system is Mac OS X,Configuration.osX()is used; otherwise,Configuration.unix()is used.The returned file system uses the given name as the host part of its URI and the URIs of paths in the file system. For example, given the name
my-file-system, the file system's URI will bezerofs://my-file-systemand the URI of the path/foo/barwill bezerofs://my-file-system/foo/bar. -
newFileSystem
Creates a new in-memory file system with the given configuration. -
newFileSystem
Creates a new in-memory file system with the given configuration.The returned file system uses the given name as the host part of its URI and the URIs of paths in the file system. For example, given the name
my-file-system, the file system's URI will bezerofs://my-file-systemand the URI of the path/foo/barwill bezerofs://my-file-system/foo/bar. -
newFileSystem
-
getSystemZeroFsProvider
Returns the system-loaded instance ofSystemZeroFsFileSystemProviderornullif it could not be found or loaded.Like
FileSystems.newFileSystem(URI, Map, ClassLoader), this method first looks in the list of installed providers and if not found there, attempts to load it from theClassLoaderwithServiceLoader.The idea is that this method should return an instance of the same class (i.e. loaded by the same class loader) as the class whose static cache a
ZeroFsFileSysteminstance will be placed in whenFileSystems.newFileSystemis called inZeroFs.newFileSystem. -
newRandomFileSystemName
-