@ThreadSafe
@ServiceImplementation(value=java.nio.file.spi.FileSystemProvider.class)
public final class TFileSystemProvider
extends java.nio.file.spi.FileSystemProvider
FileSystemProvider implementation for use with NIO.2.| Modifier and Type | Class and Description |
|---|---|
static interface |
TFileSystemProvider.Parameter
Keys for environment maps.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_ROOT_MOUNT_POINT
The root mount point of the provider for the public no-arg constructor.
|
static java.lang.String |
DEFAULT_SCHEME
The scheme of the provider for the public no-arg constructor.
|
| Constructor and Description |
|---|
TFileSystemProvider()
Deprecated.
This constructor is solely provided in order to use this
file system provider class with the service location feature of the
NIO.2 API!
|
| 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 |
delete(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) |
TFileSystem |
getFileSystem(java.net.URI uri)
Returns a file system for the given hierarchical
TPath
uri. |
TPath |
getPath(java.net.URI name)
Returns a
TPath for the given hierarchical name. |
java.lang.String |
getScheme()
Returns the default scheme of this provider.
|
boolean |
isHidden(java.nio.file.Path path) |
boolean |
isSameFile(java.nio.file.Path a,
java.nio.file.Path b) |
void |
move(java.nio.file.Path source,
java.nio.file.Path target,
java.nio.file.CopyOption... options) |
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) |
TFileSystem |
newFileSystem(java.nio.file.Path path,
java.util.Map<java.lang.String,?> configuration)
Scans the given
path for prospective archive files using the
given configuration and returns the file system for the
innermost prospective archive file or throws an
UnsupportedOperationException if no prospective archive file is
detected. |
TFileSystem |
newFileSystem(java.net.URI uri,
java.util.Map<java.lang.String,?> configuration)
Returns a file system for the given hierarchical
TPath
uri. |
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) |
<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) |
void |
setAttribute(java.nio.file.Path path,
java.lang.String attribute,
java.lang.Object value,
java.nio.file.LinkOption... options) |
public static final java.lang.String DEFAULT_SCHEME
public static final java.lang.String DEFAULT_ROOT_MOUNT_POINT
@Deprecated public TFileSystemProvider()
scheme "tpath" for accessing
any path within the root mount point URI
"file:/".public java.lang.String getScheme()
getScheme in class java.nio.file.spi.FileSystemProviderpublic TFileSystem newFileSystem(java.nio.file.Path path, java.util.Map<java.lang.String,?> configuration)
path for prospective archive files using the
given configuration and returns the file system for the
innermost prospective archive file or throws an
UnsupportedOperationException if no prospective archive file is
detected.
First, the configuration TFileSystemProvider.Parameters current enumerated.
If no value is set for a parameter key, the respective value of the
current configuration gets used.
Next, the path is scanned for prospective archive files using
the configuration resulting from the first step.
If one or more prospective archive files are found, the file system for
the innermost prospective archive file is returned.
Otherwise, an UnsupportedOperationException is thrown.
newFileSystem in class java.nio.file.spi.FileSystemProviderpath - the path to scan for prospective archive files.configuration - may contain a TArchiveDetector for the key
TFileSystemProvider.Parameter.ARCHIVE_DETECTOR.java.lang.UnsupportedOperationException - if no prospective archive file has
been detected according to the configuration resulting from
merging the given configuration with the
current configuration.public TFileSystem newFileSystem(java.net.URI uri, java.util.Map<java.lang.String,?> configuration)
TPath
uri.
First, the configuration TFileSystemProvider.Parameters current enumerated.
If no value is set for a parameter key, the respective value of the
current configuration gets used.
Next, the uri is scanned for prospective archive files using
the configuration resulting from the first step.
Any trailing separators in uri current discarded.
If one or more prospective archive files are found, the file system for
the innermost prospective archive file is returned.
Otherwise, the file system for the innermost directory is returned.
newFileSystem in class java.nio.file.spi.FileSystemProvideruri - the TPath uri to return a file system for.configuration - may contain a TArchiveDetector for the key
TFileSystemProvider.Parameter.ARCHIVE_DETECTOR.java.lang.IllegalArgumentException - if the given uri is opaque.public TFileSystem getFileSystem(java.net.URI uri)
TPath
uri.
The uri is scanned for prospective archive files using the
current configuration.
Any trailing separators in uri current discarded.
If one or more prospective archive files are found, the file system for
the innermost prospective archive file is returned.
Otherwise, the file system for the innermost directory is returned.
getFileSystem in class java.nio.file.spi.FileSystemProvideruri - the TPath uri to return a file system for.java.lang.IllegalArgumentException - if the given uri is opaque.public TPath getPath(java.net.URI name)
TPath for the given hierarchical name.
The URI path component is scanned for prospective archive files using
the current configuration.
Any trailing separators in name current discarded.
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
newByteChannel in class java.nio.file.spi.FileSystemProviderjava.io.IOExceptionpublic 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.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.IOExceptionpublic 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 delete(java.nio.file.Path path)
throws java.io.IOException
delete 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 a,
java.nio.file.Path b)
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.IOExceptionpublic 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.IOException@Nullable
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)
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.IOException