@ThreadSafe
public final class TFileSystem
extends java.nio.file.FileSystem
FileSystem implementation for use with NIO.2.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Commits all pending changes for this (federated) file system and all its
federated child file systems to their respective parent file system,
closes their associated target (archive) file in order to allow access
by third parties (e.g. other processes), cleans up any temporary
allocated resources (e.g. temporary files) and purges any cached
data.
|
java.lang.Iterable<java.nio.file.FileStore> |
getFileStores() |
TPath |
getPath(java.lang.String first,
java.lang.String... more)
Constructs a new path from the given sub path strings.
|
java.nio.file.PathMatcher |
getPathMatcher(java.lang.String syntaxAndPattern) |
java.lang.Iterable<java.nio.file.Path> |
getRootDirectories() |
java.lang.String |
getSeparator()
Returns
File.separator. |
java.nio.file.attribute.UserPrincipalLookupService |
getUserPrincipalLookupService() |
boolean |
isOpen()
Returns
true. |
boolean |
isReadOnly()
Returns
false. |
java.nio.file.WatchService |
newWatchService() |
TFileSystemProvider |
provider() |
java.util.Set<java.lang.String> |
supportedFileAttributeViews() |
void |
sync(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsSyncOption> options)
Commits all pending changes for this (federated) file system and all its
federated child file systems to their respective parent file system with
respect to the given options.
|
public TFileSystemProvider provider()
provider in class java.nio.file.FileSystempublic void close()
throws net.java.truevfs.kernel.spec.FsSyncWarningException,
net.java.truevfs.kernel.spec.FsSyncException
Calling this method is equivalent to
sync(FsSyncOptions.UMOUNT).
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.nio.file.FileSystemnet.java.truevfs.kernel.spec.FsSyncWarningException - if only warning conditions
apply.
This implies that the respective parent file system has been
synchronized with constraints, e.g. if an unclosed archive entry
stream gets forcibly closed.net.java.truevfs.kernel.spec.FsSyncException - if any error conditions apply.
This implies some loss of data!sync(BitField)public void sync(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsSyncOption> options)
throws net.java.truevfs.kernel.spec.FsSyncWarningException,
net.java.truevfs.kernel.spec.FsSyncException
options - a bit field of options for the synchronization operation.java.lang.IllegalArgumentException - if the combination of synchronization
options is illegal, e.g. if
FsSyncOption.FORCE_CLOSE_INPUT is cleared and
FsSyncOption.FORCE_CLOSE_OUTPUT is set or if
FsSyncOption.ABORT_CHANGES is set.net.java.truevfs.kernel.spec.FsSyncWarningException - if only warning conditions
apply.
This implies that the respective parent file system has been
synchronized with constraints, e.g. if
FsSyncOption.FORCE_CLOSE_INPUT or
FsSyncOption.FORCE_CLOSE_OUTPUT is set and an unclosed
archive entry stream gets forcibly closed.net.java.truevfs.kernel.spec.FsSyncException - if any error conditions apply.
This implies some loss of data!public boolean isOpen()
true.isOpen in class java.nio.file.FileSystemtrue.public boolean isReadOnly()
false.isReadOnly in class java.nio.file.FileSystemfalse.public java.lang.String getSeparator()
File.separator.getSeparator in class java.nio.file.FileSystemFile.separator.public java.lang.Iterable<java.nio.file.Path> getRootDirectories()
getRootDirectories in class java.nio.file.FileSystempublic java.lang.Iterable<java.nio.file.FileStore> getFileStores()
getFileStores in class java.nio.file.FileSystemjava.lang.UnsupportedOperationException - alwayspublic java.util.Set<java.lang.String> supportedFileAttributeViews()
supportedFileAttributeViews in class java.nio.file.FileSystempublic TPath getPath(java.lang.String first, java.lang.String... more)
This method scans the path name resulting
from the segment parameters to detect prospective archive files using
the current archive detector
TConfig.current().getArchiveDetector().
The supported path name separators are "File.separator" and
"/".
Any leading and trailing separators in the resulting path name current
discarded.
getPath in class java.nio.file.FileSystemfirst - the first sub path string.more - optional sub path strings.public java.nio.file.PathMatcher getPathMatcher(java.lang.String syntaxAndPattern)
getPathMatcher in class java.nio.file.FileSystemjava.lang.UnsupportedOperationException - alwayspublic java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService in class java.nio.file.FileSystemjava.lang.UnsupportedOperationException - alwayspublic java.nio.file.WatchService newWatchService()
throws java.io.IOException
newWatchService in class java.nio.file.FileSystemjava.lang.UnsupportedOperationException - alwaysjava.io.IOException