@ThreadSafe public interface FsDelegatingController extends FsController
FsController.Factory<Context>| Modifier and Type | Method and Description |
|---|---|
default void |
checkAccess(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types)
Checks if the file system node for the given
name exists when
constrained by the given access options and permits the given
access types. |
FsController |
getController()
The underlying file system controller.
|
default FsModel |
getModel()
Returns the file system model.
|
default FsController |
getParent()
Returns the controller for the parent file system or
null if
and only if this file system is not federated, i.e. |
default net.java.truecommons.cio.InputSocket<? extends net.java.truecommons.cio.Entry> |
input(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Returns an input socket for reading the contents of the file system
node addressed by the given name from the file system.
|
default void |
make(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.cio.Entry.Type type,
net.java.truecommons.cio.Entry template)
Creates or replaces and finally links a chain of one or more entries
for the given node
name into the file system. |
default FsNode |
node(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Returns the file system node for the given
name or null
if it doesn't exist. |
default net.java.truecommons.cio.OutputSocket<? extends net.java.truecommons.cio.Entry> |
output(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.cio.Entry template)
Returns an output socket for writing the contents of the node addressed
by the given name to the file system.
|
default void |
setReadOnly(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Sets the named file system node as read-only.
|
default boolean |
setTime(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types,
long value)
Makes an attempt to set the last access time of all types in the given
bit field for the file system node with the given name.
|
default boolean |
setTime(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
java.util.Map<net.java.truecommons.cio.Entry.Access,java.lang.Long> times)
Makes an attempt to set the last access time of all types in the given
map for the file system node with the given name.
|
default void |
sync(net.java.truecommons.shed.BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of this file system
to its parent file system,
releases the associated resources (e.g.
|
default void |
unlink(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Removes the named file system node from the file system.
|
FsController getController()
default FsController getParent()
FsControllernull if
and only if this file system is not federated, i.e. not a member of
another file system.
Multiple invocations must return the same object.getParent in interface FsControllerdefault FsModel getModel()
FsControllergetModel in interface FsController@CheckForNull default FsNode node(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws java.io.IOException
FsControllername or null
if it doesn't exist.
Modifying the returned node does not show any effect on the file system
and should result in an UnsupportedOperationException.node in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.null if no file system node
exists for the given name.java.io.IOException - on any I/O error.default void checkAccess(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types) throws java.io.IOException
FsControllername exists when
constrained by the given access options and permits the given
access types.checkAccess in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.types - the types of the desired access.java.io.IOException - on any I/O error.default void setReadOnly(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws java.io.IOException
FsControllersetReadOnly in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.java.io.IOException - on any I/O error or if this operation is not
supported.default boolean setTime(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, java.util.Map<net.java.truecommons.cio.Entry.Access,java.lang.Long> times) throws java.io.IOException
FsControllerfalse is returned or an IOException is thrown, then
still some of the last access times may have been set.
Whether or not this is an atomic operation is specific to the
implementation.setTime in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.times - the access times.true if and only if setting the access time for all
types in times succeeded.java.io.IOException - on any I/O error.default boolean setTime(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types, long value) throws java.io.IOException
FsControllerfalse is returned or an IOException is thrown, then
still some of the last access times may have been set.setTime in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.types - the access types.value - the last access time.true if and only if setting the access time for all
types in types succeeded.java.io.IOException - on any I/O error.default net.java.truecommons.cio.InputSocket<? extends net.java.truecommons.cio.Entry> input(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name)
FsControllerinput in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.InputSocket.default net.java.truecommons.cio.OutputSocket<? extends net.java.truecommons.cio.Entry> output(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, @CheckForNull net.java.truecommons.cio.Entry template)
FsControlleroutput in interface FsControlleroptions - the options for accessing the file system node.
If FsAccessOption.CREATE_PARENTS is set, any missing
parent directories shall get created with an undefined last
modification time.name - the name of the file system node.template - if not null, then the file system node
at the end of the chain shall inherit as much properties from
this node as possible - with the exception of its name and type.OutputSocket.default void make(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.cio.Entry.Type type, @CheckForNull net.java.truecommons.cio.Entry template) throws java.io.IOException
FsControllername into the file system.make in interface FsControlleroptions - the options for accessing the file system node.
If FsAccessOption.CREATE_PARENTS is set, any missing
parent directories shall get created with an undefined last
modification time.name - the name of the file system node.type - the file system node type.template - if not null, then the file system node
at the end of the chain shall inherit as much properties from
this node as possible - with the exception of its name and type.java.io.IOException - on any I/O error, including but not limited to
these reasons:
name contains characters which are not
supported by the file system.
FsAccessOption.EXCLUSIVE is set or the node is a
directory.
createParents is
false.
default void unlink(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws java.io.IOException
FsControllerunlink in interface FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.java.io.IOException - on any I/O error.default void sync(net.java.truecommons.shed.BitField<FsSyncOption> options) throws FsSyncException
FsControllerAn implementation may ignore calls to this method if its stateless.
sync in interface FsControlleroptions - the options for synchronizing the file system.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.