Class LayerFS
- java.lang.Object
-
- java.nio.file.FileSystem
-
- io.virtdata.docsys.metafs.core.MetaFS
-
- io.virtdata.docsys.metafs.fs.layerfs.LayerFS
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class LayerFS extends MetaFS
This filesystem is a filesystem aggregator, allowing users to provide layered views of existing filesystems. The URI is merely symbolic in this filesystem, since the user must endRenderers any wrapped filesystems separately from the call toFileSystemProvider.newFileSystem(URI, Map).Meta Details
In general, operations are attempted on each filesystem, each with a path scoped to that filesystem instance, until the operation succeeds without throwing an error.
For operations which specify read-specific or write-specific options, any read-only filesystems are skipped when write mode is requested. By default, filesystems are registered as readonly, providing some default safety.
-
-
Field Summary
-
Fields inherited from class io.virtdata.docsys.metafs.core.MetaFS
isReadOnly
-
-
Constructor Summary
Constructors Constructor Description LayerFS()
-
Method Summary
Modifier and Type Method Description LayerFSaddLayer(java.nio.file.FileSystem fileSystem)LayerFSaddLayer(java.nio.file.Path outerPath)java.lang.Iterable<java.nio.file.FileStore>getFileStores()java.nio.file.PathgetPath(java.lang.String first, java.lang.String... more)java.nio.file.PathMatchergetPathMatcher(java.lang.String syntaxAndPattern)java.lang.Iterable<java.nio.file.Path>getRootDirectories()java.lang.StringgetSeparator()java.nio.file.attribute.UserPrincipalLookupServicegetUserPrincipalLookupService()java.util.List<java.nio.file.FileSystem>getWrappedFilesystems()java.nio.channels.SeekableByteChannelnewByteChannel(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs)java.nio.file.WatchServicenewWatchService()LayerFSProviderprovider()LayerFSsetWritable(boolean writable)java.util.Set<java.lang.String>supportedFileAttributeViews()java.lang.StringtoString()-
Methods inherited from class io.virtdata.docsys.metafs.core.MetaFS
checkAccess, close, getRootPath, isOpen, isReadOnly, newFileChannel, newInputStream
-
-
-
-
Method Detail
-
setWritable
public LayerFS setWritable(boolean writable)
-
addLayer
public LayerFS addLayer(java.nio.file.Path outerPath)
-
addLayer
public LayerFS addLayer(java.nio.file.FileSystem fileSystem)
-
getRootDirectories
public java.lang.Iterable<java.nio.file.Path> getRootDirectories()
- Specified by:
getRootDirectoriesin classjava.nio.file.FileSystem
-
provider
public LayerFSProvider provider()
- Specified by:
providerin classjava.nio.file.FileSystem
-
getSeparator
public java.lang.String getSeparator()
- Specified by:
getSeparatorin classjava.nio.file.FileSystem
-
getFileStores
public java.lang.Iterable<java.nio.file.FileStore> getFileStores()
- Specified by:
getFileStoresin classjava.nio.file.FileSystem
-
supportedFileAttributeViews
public java.util.Set<java.lang.String> supportedFileAttributeViews()
- Specified by:
supportedFileAttributeViewsin classjava.nio.file.FileSystem
-
getPath
public java.nio.file.Path getPath(java.lang.String first, java.lang.String... more)
-
newByteChannel
public java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs) throws java.io.IOException- Specified by:
newByteChannelin classMetaFS- Throws:
java.io.IOException
-
getPathMatcher
public java.nio.file.PathMatcher getPathMatcher(java.lang.String syntaxAndPattern)
- Overrides:
getPathMatcherin classMetaFS
-
getUserPrincipalLookupService
public java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
- Overrides:
getUserPrincipalLookupServicein classMetaFS
-
newWatchService
public java.nio.file.WatchService newWatchService() throws java.io.IOException- Overrides:
newWatchServicein classMetaFS- Throws:
java.io.IOException
-
getWrappedFilesystems
public java.util.List<java.nio.file.FileSystem> getWrappedFilesystems()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-