@ThreadSafe public final class TFileSystem extends 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.
|
Iterable<FileStore> |
getFileStores() |
TPath |
getPath(String first,
String... more)
Constructs a new path from the given sub path strings.
|
PathMatcher |
getPathMatcher(String syntaxAndPattern) |
Iterable<Path> |
getRootDirectories() |
String |
getSeparator()
Returns
File.separator . |
UserPrincipalLookupService |
getUserPrincipalLookupService() |
boolean |
isOpen()
Returns
true . |
boolean |
isReadOnly()
Returns
false . |
WatchService |
newWatchService() |
TFileSystemProvider |
provider() |
Set<String> |
supportedFileAttributeViews() |
void |
sync(net.java.truecommons.shed.BitField<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 void close() throws FsSyncWarningException, FsSyncException
Calling this method is equivalent to
sync(FsSyncOptions.UMOUNT)
.
close
in interface Closeable
close
in interface AutoCloseable
close
in class FileSystem
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.FsSyncException
- if any error conditions apply.
This implies some loss of data!sync(BitField)
public Iterable<FileStore> getFileStores()
getFileStores
in class FileSystem
UnsupportedOperationException
- alwayspublic TPath getPath(String first, 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 FileSystem
first
- the first sub path string.more
- optional sub path strings.public PathMatcher getPathMatcher(String syntaxAndPattern)
getPathMatcher
in class FileSystem
UnsupportedOperationException
- alwayspublic Iterable<Path> getRootDirectories()
getRootDirectories
in class FileSystem
public String getSeparator()
File.separator
.getSeparator
in class FileSystem
File.separator
.public UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService
in class FileSystem
UnsupportedOperationException
- alwayspublic boolean isOpen()
true
.isOpen
in class FileSystem
true
.public boolean isReadOnly()
false
.isReadOnly
in class FileSystem
false
.public WatchService newWatchService() throws IOException
newWatchService
in class FileSystem
UnsupportedOperationException
- alwaysIOException
public TFileSystemProvider provider()
provider
in class FileSystem
public Set<String> supportedFileAttributeViews()
supportedFileAttributeViews
in class FileSystem
public void sync(net.java.truecommons.shed.BitField<FsSyncOption> options) throws FsSyncWarningException, FsSyncException
options
- a bit field of options for the synchronization operation.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.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.FsSyncException
- if any error conditions apply.
This implies some loss of data!Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.