@ThreadSafe public final class TFileSystem extends java.nio.file.FileSystem
FileSystem implementation based on the TrueZIP Kernel module.| Modifier and Type | Class and Description |
|---|---|
private class |
TFileSystem.FsEntryAttributes |
private class |
TFileSystem.FsEntryAttributeView |
private static class |
TFileSystem.Stream |
| Modifier and Type | Field and Description |
|---|---|
private de.schlichtherle.truezip.fs.FsController<?> |
controller |
private TFileSystemProvider |
provider |
| Constructor and Description |
|---|
TFileSystem(TPath path) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkAccess(TPath path,
java.nio.file.AccessMode... modes) |
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.
|
(package private) void |
createDirectory(TPath path,
java.nio.file.attribute.FileAttribute<?>... attrs) |
(package private) void |
delete(TPath path) |
private de.schlichtherle.truezip.fs.FsController<?> |
getController() |
(package private) de.schlichtherle.truezip.fs.FsEntry |
getEntry(TPath path) |
(package private) <V extends java.nio.file.attribute.FileAttributeView> |
getFileAttributeView(TPath path,
Class<V> type,
java.nio.file.LinkOption... options) |
Iterable<java.nio.file.FileStore> |
getFileStores() |
(package private) de.schlichtherle.truezip.socket.InputSocket<?> |
getInputSocket(TPath path,
de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsInputOption> options) |
(package private) de.schlichtherle.truezip.fs.FsMountPoint |
getMountPoint() |
(package private) de.schlichtherle.truezip.socket.OutputSocket<?> |
getOutputSocket(TPath path,
de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsOutputOption> options,
de.schlichtherle.truezip.entry.Entry template) |
TPath |
getPath(String first,
String... more)
Constructs a new path from the given sub path strings.
|
java.nio.file.PathMatcher |
getPathMatcher(String syntaxAndPattern) |
Iterable<java.nio.file.Path> |
getRootDirectories() |
String |
getSeparator()
Returns
File.separator. |
java.nio.file.attribute.UserPrincipalLookupService |
getUserPrincipalLookupService() |
private boolean |
invariants() |
static boolean |
isLenient()
Equivalent to
TConfig.get().isLenient(). |
boolean |
isOpen()
Returns
true. |
boolean |
isReadOnly()
Returns
false. |
(package private) SeekableByteChannel |
newByteChannel(TPath path,
Set<? extends java.nio.file.OpenOption> options,
java.nio.file.attribute.FileAttribute<?>... attrs) |
(package private) java.nio.file.DirectoryStream<java.nio.file.Path> |
newDirectoryStream(TPath path,
java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter) |
(package private) InputStream |
newInputStream(TPath path,
java.nio.file.OpenOption... options) |
(package private) OutputStream |
newOutputStream(TPath path,
java.nio.file.OpenOption... options) |
java.nio.file.WatchService |
newWatchService() |
TFileSystemProvider |
provider() |
(package private) <A extends java.nio.file.attribute.BasicFileAttributes> |
readAttributes(TPath path,
Class<A> type,
java.nio.file.LinkOption... options) |
static void |
setLenient(boolean lenient)
Equivalent to
TConfig.get().setLenient(lenient). |
Set<String> |
supportedFileAttributeViews() |
void |
sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.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.
|
private final de.schlichtherle.truezip.fs.FsController<?> controller
private final TFileSystemProvider provider
TFileSystem(TPath path)
void checkAccess(TPath path, java.nio.file.AccessMode... modes) throws IOException
IOExceptionpublic void close()
throws de.schlichtherle.truezip.fs.FsSyncException
Calling this method is equivalent to
sync(FsSyncOptions.UMOUNT).
close in interface Closeableclose in interface AutoCloseableclose in class java.nio.file.FileSystemde.schlichtherle.truezip.fs.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.de.schlichtherle.truezip.fs.FsSyncException - if any error conditions apply.
This implies some loss of data!sync(BitField)void createDirectory(TPath path, java.nio.file.attribute.FileAttribute<?>... attrs) throws IOException
IOExceptionvoid delete(TPath path) throws IOException
IOExceptionprivate de.schlichtherle.truezip.fs.FsController<?> getController()
de.schlichtherle.truezip.fs.FsEntry getEntry(TPath path) throws IOException
IOException@Nullable <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(TPath path, Class<V> type, java.nio.file.LinkOption... options)
public Iterable<java.nio.file.FileStore> getFileStores()
getFileStores in class java.nio.file.FileSystemUnsupportedOperationException - alwaysde.schlichtherle.truezip.socket.InputSocket<?> getInputSocket(TPath path, de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsInputOption> options)
de.schlichtherle.truezip.fs.FsMountPoint getMountPoint()
de.schlichtherle.truezip.socket.OutputSocket<?> getOutputSocket(TPath path, de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsOutputOption> options, @CheckForNull de.schlichtherle.truezip.entry.Entry template)
public TPath getPath(String first, String... more)
This method scans the path name resulting
from the segment parameters to detect prospective archive files using
the default archive detector.
The supported path name separators are "File.separator" and
"/".
Any leading and trailing separators in the resulting path name get
discarded.
getPath in class java.nio.file.FileSystemfirst - the first sub path string.more - optional sub path strings.public java.nio.file.PathMatcher getPathMatcher(String syntaxAndPattern)
getPathMatcher in class java.nio.file.FileSystemUnsupportedOperationException - alwayspublic Iterable<java.nio.file.Path> getRootDirectories()
getRootDirectories in class java.nio.file.FileSystempublic String getSeparator()
File.separator.getSeparator in class java.nio.file.FileSystemFile.separator.public java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService in class java.nio.file.FileSystemUnsupportedOperationException - alwaysprivate boolean invariants()
public static boolean isLenient()
TConfig.get().isLenient().public boolean isOpen()
true.isOpen in class java.nio.file.FileSystemtrue.public boolean isReadOnly()
false.isReadOnly in class java.nio.file.FileSystemfalse.SeekableByteChannel newByteChannel(TPath path, Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs) throws IOException
IOExceptionjava.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(TPath path, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter) throws IOException
IOExceptionInputStream newInputStream(TPath path, java.nio.file.OpenOption... options) throws IOException
IOExceptionOutputStream newOutputStream(TPath path, java.nio.file.OpenOption... options) throws IOException
IOExceptionpublic java.nio.file.WatchService newWatchService() throws IOException
newWatchService in class java.nio.file.FileSystemUnsupportedOperationException - alwaysIOExceptionpublic TFileSystemProvider provider()
provider in class java.nio.file.FileSystem<A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes(TPath path, Class<A> type, java.nio.file.LinkOption... options) throws IOException
IOExceptionpublic static void setLenient(boolean lenient)
TConfig.get().setLenient(lenient).public Set<String> supportedFileAttributeViews()
supportedFileAttributeViews in class java.nio.file.FileSystempublic void sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption> options)
throws de.schlichtherle.truezip.fs.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.de.schlichtherle.truezip.fs.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.de.schlichtherle.truezip.fs.FsSyncException - if any error conditions apply.
This implies some loss of data!Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.