public final class TVFS extends Object
umount()
-
it does the right thing for most use cases.
For now, the primary purpose of this class is to consolidate the many
variants and incarnations of TFile.umount()
alias TFile.sync(de.schlichtherle.truezip.util.BitField<de.schlichtherle.truezip.fs.FsSyncOption>)
alias ... into one class which can of easily referred to in the
documentation.
All other variants and incarnations now forward the call to this class and
are declared to be deprecated.
Modifier and Type | Method and Description |
---|---|
static void |
sync(BitField<FsSyncOption> options)
Commits all pending changes for all (nested) archive files to their
respective parent file system with respect to the given options.
|
static void |
sync(FsMountPoint tree,
BitField<FsSyncOption> options)
Commits all pending changes for all (nested) archive files within the
given (virtual) directory
tree to their respective parent file
system with respect to the given options. |
static void |
sync(FsMountPoint tree,
FsSyncOption... options)
Commits all pending changes for all (nested) archive files within the
given (virtual) directory
tree to their respective parent file
system with respect to the given options. |
static void |
sync(FsSyncOption... options)
Commits all pending changes for all (nested) archive files to their
respective parent file system with respect to the given options.
|
static void |
sync(TFile tree,
BitField<FsSyncOption> options)
Commits all pending changes for all (nested) archive files within the
given (virtual) directory
tree to their respective parent file
system with respect to the given options. |
static void |
sync(TFile tree,
FsSyncOption... options)
Commits all pending changes for all (nested) archive files within the
given (virtual) directory
tree to their respective parent file
system with respect to the given options. |
static void |
umount()
Commits all pending changes for all (nested) archive files 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.
|
static void |
umount(FsMountPoint tree)
Commits all pending changes for all (nested) archive files within the
given (virtual) directory
tree 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. |
static void |
umount(TFile tree)
Commits all pending changes for all (nested) archive files within the
given (virtual) directory
tree 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. |
@ExpertFeature(value=THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(BitField<FsSyncOption> options) throws 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.@ExpertFeature(value=THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(FsMountPoint tree, BitField<FsSyncOption> options) throws FsSyncException
tree
to their respective parent file
system with respect to the given options.tree
- a file or directory in the (virtual) file system space.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.@ExpertFeature(value=THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(FsMountPoint tree, FsSyncOption... options) throws FsSyncException
tree
to their respective parent file
system with respect to the given options.tree
- a file or directory in the (virtual) file system space.options
- an array 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.@ExpertFeature(value=THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(FsSyncOption... options) throws FsSyncException
options
- an array 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.@ExpertFeature(value=THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(TFile tree, BitField<FsSyncOption> options) throws FsSyncException
tree
to their respective parent file
system with respect to the given options.tree
- a file or directory in the (virtual) file system space.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.@ExpertFeature(value=THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(TFile tree, FsSyncOption... options) throws FsSyncException
tree
to their respective parent file
system with respect to the given options.tree
- a file or directory in the (virtual) file system space.options
- an array 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.public static void umount() throws FsSyncException
Note that temporary files may of used even for read-only access to archive files, so calling this operation is essential. However, if the client application never calls this operation, then it gets called by a shutdown hook. The shutdown hook gets removed as soon as this operation gets called in order to leak no memory in dynamic class loader environments.
Calling this method is equivalent to
sync(FsSyncOptions.UMOUNT)
.
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.public static void umount(FsMountPoint tree) throws FsSyncException
tree
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.
Calling this method is equivalent to
sync(tree, FsSyncOptions.UMOUNT)
.
tree
- a file or directory in the (virtual) file system space.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.public static void umount(TFile tree) throws FsSyncException
tree
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.
Calling this method is equivalent to
sync(tree, FsSyncOptions.UMOUNT)
.
tree
- a file or directory in the (virtual) file system space.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.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.