public class RootedFileSystemProvider
extends java.nio.file.spi.FileSystemProvider
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.nio.file.Path,RootedFileSystem> |
fileSystems |
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
RootedFileSystemProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(java.nio.file.Path path,
java.nio.file.AccessMode... modes) |
void |
copy(java.nio.file.Path source,
java.nio.file.Path target,
java.nio.file.CopyOption... options) |
void |
createDirectory(java.nio.file.Path dir,
java.nio.file.attribute.FileAttribute<?>... attrs) |
void |
createLink(java.nio.file.Path link,
java.nio.file.Path existing) |
protected void |
createLink(java.nio.file.Path link,
java.nio.file.Path target,
boolean symLink,
java.nio.file.attribute.FileAttribute<?>... attrs) |
void |
createSymbolicLink(java.nio.file.Path link,
java.nio.file.Path target,
java.nio.file.attribute.FileAttribute<?>... attrs) |
void |
delete(java.nio.file.Path path) |
boolean |
deleteIfExists(java.nio.file.Path path) |
private static java.nio.file.Path |
ensureDirectory(java.nio.file.Path path) |
<V extends java.nio.file.attribute.FileAttributeView> |
getFileAttributeView(java.nio.file.Path path,
java.lang.Class<V> type,
java.nio.file.LinkOption... options) |
java.nio.file.FileStore |
getFileStore(java.nio.file.Path path) |
protected RootedFileSystem |
getFileSystem(java.nio.file.Path path) |
java.nio.file.FileSystem |
getFileSystem(java.net.URI uri) |
java.nio.file.Path |
getPath(java.net.URI uri) |
java.lang.String |
getScheme() |
boolean |
isHidden(java.nio.file.Path path) |
boolean |
isSameFile(java.nio.file.Path path,
java.nio.file.Path path2) |
void |
move(java.nio.file.Path source,
java.nio.file.Path target,
java.nio.file.CopyOption... options) |
java.nio.channels.AsynchronousFileChannel |
newAsynchronousFileChannel(java.nio.file.Path path,
java.util.Set<? extends java.nio.file.OpenOption> options,
java.util.concurrent.ExecutorService executor,
java.nio.file.attribute.FileAttribute<?>... attrs) |
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) |
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.channels.FileChannel |
newFileChannel(java.nio.file.Path path,
java.util.Set<? extends java.nio.file.OpenOption> options,
java.nio.file.attribute.FileAttribute<?>... attrs) |
protected java.nio.file.FileSystem |
newFileSystem(java.lang.Object src,
java.nio.file.Path path,
java.util.Map<java.lang.String,?> env) |
java.nio.file.FileSystem |
newFileSystem(java.nio.file.Path path,
java.util.Map<java.lang.String,?> env) |
java.nio.file.FileSystem |
newFileSystem(java.net.URI uri,
java.util.Map<java.lang.String,?> env) |
java.io.InputStream |
newInputStream(java.nio.file.Path path,
java.nio.file.OpenOption... options) |
java.io.OutputStream |
newOutputStream(java.nio.file.Path path,
java.nio.file.OpenOption... options) |
protected java.nio.file.spi.FileSystemProvider |
provider(java.nio.file.Path path) |
<A extends java.nio.file.attribute.BasicFileAttributes> |
readAttributes(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) |
java.nio.file.Path |
readSymbolicLink(java.nio.file.Path link) |
protected java.nio.file.Path |
resolveLocalPath(RootedPath path) |
protected java.nio.file.DirectoryStream<java.nio.file.Path> |
root(RootedFileSystem rfs,
java.nio.file.DirectoryStream<java.nio.file.Path> ds) |
protected java.util.Iterator<java.nio.file.Path> |
root(RootedFileSystem rfs,
java.util.Iterator<java.nio.file.Path> iter) |
protected java.nio.file.Path |
root(RootedFileSystem rfs,
java.nio.file.Path nat) |
void |
setAttribute(java.nio.file.Path path,
java.lang.String attribute,
java.lang.Object value,
java.nio.file.LinkOption... options) |
protected java.nio.file.Path |
unroot(java.nio.file.Path path) |
protected java.nio.file.Path |
uriToPath(java.net.URI uri) |
protected final org.slf4j.Logger log
private final java.util.Map<java.nio.file.Path,RootedFileSystem> fileSystems
public java.lang.String getScheme()
getScheme in class java.nio.file.spi.FileSystemProviderpublic java.nio.file.FileSystem newFileSystem(java.net.URI uri,
java.util.Map<java.lang.String,?> env)
throws java.io.IOException
newFileSystem in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic java.nio.file.FileSystem getFileSystem(java.net.URI uri)
getFileSystem in class java.nio.file.spi.FileSystemProviderpublic java.nio.file.FileSystem newFileSystem(java.nio.file.Path path,
java.util.Map<java.lang.String,?> env)
throws java.io.IOException
newFileSystem in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionprotected java.nio.file.FileSystem newFileSystem(java.lang.Object src,
java.nio.file.Path path,
java.util.Map<java.lang.String,?> env)
throws java.io.IOException
java.io.IOExceptionprotected java.nio.file.Path uriToPath(java.net.URI uri)
private static java.nio.file.Path ensureDirectory(java.nio.file.Path path)
public java.nio.file.Path getPath(java.net.URI uri)
getPath in class java.nio.file.spi.FileSystemProviderpublic java.io.InputStream newInputStream(java.nio.file.Path path,
java.nio.file.OpenOption... options)
throws java.io.IOException
newInputStream in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic java.io.OutputStream newOutputStream(java.nio.file.Path path,
java.nio.file.OpenOption... options)
throws java.io.IOException
newOutputStream in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic java.nio.channels.FileChannel newFileChannel(java.nio.file.Path path,
java.util.Set<? extends java.nio.file.OpenOption> options,
java.nio.file.attribute.FileAttribute<?>... attrs)
throws java.io.IOException
newFileChannel in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic java.nio.channels.AsynchronousFileChannel newAsynchronousFileChannel(java.nio.file.Path path,
java.util.Set<? extends java.nio.file.OpenOption> options,
java.util.concurrent.ExecutorService executor,
java.nio.file.attribute.FileAttribute<?>... attrs)
throws java.io.IOException
newAsynchronousFileChannel in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic 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
newByteChannel in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic 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
newDirectoryStream in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionprotected java.nio.file.DirectoryStream<java.nio.file.Path> root(RootedFileSystem rfs, java.nio.file.DirectoryStream<java.nio.file.Path> ds)
protected java.util.Iterator<java.nio.file.Path> root(RootedFileSystem rfs, java.util.Iterator<java.nio.file.Path> iter)
public void createDirectory(java.nio.file.Path dir,
java.nio.file.attribute.FileAttribute<?>... attrs)
throws java.io.IOException
createDirectory in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic void createSymbolicLink(java.nio.file.Path link,
java.nio.file.Path target,
java.nio.file.attribute.FileAttribute<?>... attrs)
throws java.io.IOException
createSymbolicLink in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic void createLink(java.nio.file.Path link,
java.nio.file.Path existing)
throws java.io.IOException
createLink in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionprotected void createLink(java.nio.file.Path link,
java.nio.file.Path target,
boolean symLink,
java.nio.file.attribute.FileAttribute<?>... attrs)
throws java.io.IOException
java.io.IOExceptionpublic void delete(java.nio.file.Path path)
throws java.io.IOException
delete in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic boolean deleteIfExists(java.nio.file.Path path)
throws java.io.IOException
deleteIfExists in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic java.nio.file.Path readSymbolicLink(java.nio.file.Path link)
throws java.io.IOException
readSymbolicLink in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic void copy(java.nio.file.Path source,
java.nio.file.Path target,
java.nio.file.CopyOption... options)
throws java.io.IOException
copy in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic void move(java.nio.file.Path source,
java.nio.file.Path target,
java.nio.file.CopyOption... options)
throws java.io.IOException
move in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic boolean isSameFile(java.nio.file.Path path,
java.nio.file.Path path2)
throws java.io.IOException
isSameFile in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic boolean isHidden(java.nio.file.Path path)
throws java.io.IOException
isHidden in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic java.nio.file.FileStore getFileStore(java.nio.file.Path path)
throws java.io.IOException
getFileStore in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionprotected RootedFileSystem getFileSystem(java.nio.file.Path path) throws java.nio.file.FileSystemNotFoundException
java.nio.file.FileSystemNotFoundExceptionpublic void checkAccess(java.nio.file.Path path,
java.nio.file.AccessMode... modes)
throws java.io.IOException
checkAccess in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(java.nio.file.Path path,
java.lang.Class<V> type,
java.nio.file.LinkOption... options)
getFileAttributeView in class java.nio.file.spi.FileSystemProviderpublic <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
readAttributes in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic 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
readAttributes in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic void setAttribute(java.nio.file.Path path,
java.lang.String attribute,
java.lang.Object value,
java.nio.file.LinkOption... options)
throws java.io.IOException
setAttribute in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionprotected java.nio.file.spi.FileSystemProvider provider(java.nio.file.Path path)
protected java.nio.file.Path root(RootedFileSystem rfs, java.nio.file.Path nat)
protected java.nio.file.Path unroot(java.nio.file.Path path)
path - The original (rooted) PathPath represented by the rooted
onejava.lang.IllegalArgumentException - if null path argumentjava.nio.file.ProviderMismatchException - if not a RootedPathresolveLocalPath(RootedPath)protected java.nio.file.Path resolveLocalPath(RootedPath path)
path - The original RootedPath - never nullPath represented by the rooted onejava.nio.file.InvalidPathException - If the resolved path is not a proper sub-path of the rooted file system