Class VirtFSProvider
- java.lang.Object
-
- java.nio.file.spi.FileSystemProvider
-
- io.virtdata.docsys.metafs.core.MetaFSProvider
-
- io.virtdata.docsys.metafs.fs.virtual.VirtFSProvider
-
- Direct Known Subclasses:
RenderFSProvider
public class VirtFSProvider extends MetaFSProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.net.URI,VirtFS>filesystemsprotected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Modifier Constructor Description protectedVirtFSProvider()
-
Method Summary
Modifier and Type Method Description voidcheckAccess(java.nio.file.Path path, java.nio.file.AccessMode... modes)voidcopy(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)voidcreateDirectory(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)voiddelete(java.nio.file.Path path)static VirtFSProviderget()protected java.nio.file.PathgetContainerPath(java.nio.file.Path path)<V extends java.nio.file.attribute.FileAttributeView>
VgetFileAttributeView(java.nio.file.Path path, java.lang.Class<V> type, java.nio.file.LinkOption... options)java.nio.file.FileStoregetFileStore(java.nio.file.Path path)java.nio.file.FileSystemgetFileSystem(java.net.URI uri)java.nio.file.PathgetPath(java.net.URI uri)java.lang.StringgetScheme()booleanisHidden(java.nio.file.Path path)booleanisSameFile(java.nio.file.Path path, java.nio.file.Path path2)voidmove(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)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.DirectoryStream<java.nio.file.Path>newDirectoryStream(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)java.nio.file.FileSystemnewFileSystem(java.net.URI uri, java.util.Map<java.lang.String,?> env)<A extends java.nio.file.attribute.BasicFileAttributes>
AreadAttributes(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options)java.util.Map<java.lang.String,java.lang.Object>readAttributes(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options)voidsetAttribute(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options)-
Methods inherited from class io.virtdata.docsys.metafs.core.MetaFSProvider
newFileChannel
-
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
filesystems
protected java.util.Map<java.net.URI,VirtFS> filesystems
-
-
Method Detail
-
get
public static VirtFSProvider get()
-
getScheme
public java.lang.String getScheme()
- Overrides:
getSchemein classMetaFSProvider
-
newFileSystem
public java.nio.file.FileSystem newFileSystem(java.net.URI uri, java.util.Map<java.lang.String,?> env) throws java.io.IOException- Overrides:
newFileSystemin classMetaFSProvider- Throws:
java.io.IOException
-
getFileSystem
public java.nio.file.FileSystem getFileSystem(java.net.URI uri)
- Overrides:
getFileSystemin classMetaFSProvider
-
getPath
public java.nio.file.Path getPath(java.net.URI uri)
Meta Details
Although this is a meta FS, and the URIs are essentially symbolic, we still enforce that the logical nesting of a filesystem URI and a path URI will determine when this method will return a valid value. In other words, a path will not be returned for a meta file system wherein the URI of that file system does not logical contain the inner path. This should maintain important semantics about usage and filtering that developers may take for granted.
- Overrides:
getPathin classMetaFSProvider
-
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- Overrides:
newByteChannelin classMetaFSProvider- Throws:
java.io.IOException
-
createDirectory
public void createDirectory(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs) throws java.io.IOException- Overrides:
createDirectoryin classMetaFSProvider- Throws:
java.io.IOException
-
delete
public void delete(java.nio.file.Path path) throws java.io.IOException- Overrides:
deletein classMetaFSProvider- Throws:
java.io.IOException
-
copy
public void copy(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options) throws java.io.IOException- Overrides:
copyin classMetaFSProvider- Throws:
java.io.IOException
-
move
public void move(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options) throws java.io.IOException- Overrides:
movein classMetaFSProvider- Throws:
java.io.IOException
-
isSameFile
public boolean isSameFile(java.nio.file.Path path, java.nio.file.Path path2) throws java.io.IOException- Overrides:
isSameFilein classMetaFSProvider- Throws:
java.io.IOException
-
isHidden
public boolean isHidden(java.nio.file.Path path) throws java.io.IOException- Overrides:
isHiddenin classMetaFSProvider- Throws:
java.io.IOException
-
getFileStore
public java.nio.file.FileStore getFileStore(java.nio.file.Path path) throws java.io.IOException- Overrides:
getFileStorein classMetaFSProvider- Throws:
java.io.IOException
-
checkAccess
public void checkAccess(java.nio.file.Path path, java.nio.file.AccessMode... modes) throws java.io.IOException- Overrides:
checkAccessin classMetaFSProvider- Throws:
java.io.IOException
-
getFileAttributeView
public <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(java.nio.file.Path path, java.lang.Class<V> type, java.nio.file.LinkOption... options)- Overrides:
getFileAttributeViewin classMetaFSProvider
-
readAttributes
public <A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options) throws java.io.IOException- Overrides:
readAttributesin classMetaFSProvider- Throws:
java.io.IOException
-
readAttributes
public java.util.Map<java.lang.String,java.lang.Object> readAttributes(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options) throws java.io.IOException- Overrides:
readAttributesin classMetaFSProvider- Throws:
java.io.IOException
-
setAttribute
public void setAttribute(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options) throws java.io.IOException- Overrides:
setAttributein classMetaFSProvider- Throws:
java.io.IOException
-
getContainerPath
protected java.nio.file.Path getContainerPath(java.nio.file.Path path)
-
newDirectoryStream
public java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter) throws java.io.IOException- Overrides:
newDirectoryStreamin classMetaFSProvider- Throws:
java.io.IOException
-
-