E - The type of the archive entries.@NotThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) final class FsReadOnlyArchiveFileSystem<E extends FsArchiveEntry> extends FsArchiveFileSystem<E>
All modifying methods throw a FsReadOnlyArchiveFileSystemException.
| Constructor and Description |
|---|
FsReadOnlyArchiveFileSystem(EntryContainer<E> archive,
FsArchiveDriver<E> driver,
Entry rootTemplate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadOnly()
Returns
true to indicate that this archive file system is
read-only. |
boolean |
isTouched()
Returns
true if and only if this archive file system has been
modified since its time of creation. |
FsArchiveFileSystemOperation<E> |
mknod(FsEntryName name,
Entry.Type type,
BitField<FsOutputOption> options,
Entry template)
Begins a transaction to create or replace and finally link a
chain of one or more archive entries for the given
path into
this archive file system. |
boolean |
setTime(FsEntryName path,
BitField<Entry.Access> types,
long value) |
void |
unlink(FsEntryName path)
If this method returns, the file system entry identified by the given
path has been successfully deleted from this archive file
system. |
addFsArchiveFileSystemTouchListener, getEntry, getFsArchiveFileSystemTouchListeners, getSize, isWritable, iterator, newArchiveFileSystem, newArchiveFileSystem, removeFsArchiveFileSystemTouchListener, setReadOnlyFsReadOnlyArchiveFileSystem(EntryContainer<E> archive, FsArchiveDriver<E> driver, Entry rootTemplate)
public boolean isReadOnly()
true to indicate that this archive file system is
read-only.isReadOnly in class FsArchiveFileSystem<E extends FsArchiveEntry>truepublic boolean isTouched()
FsArchiveFileSystemtrue if and only if this archive file system has been
modified since its time of creation.isTouched in class FsArchiveFileSystem<E extends FsArchiveEntry>true if and only if this archive file system has been
modified since its time of creation.public FsArchiveFileSystemOperation<E> mknod(FsEntryName name, Entry.Type type, BitField<FsOutputOption> options, Entry template) throws FsArchiveFileSystemException
FsArchiveFileSystempath into
this archive file system.
To commit the transaction, you need to call
FsArchiveFileSystemOperation.run() on the returned object, which
will mark this archive file system as touched and
set the last modification time of the created and linked archive file
system entries to the system's current time at the moment of the call
to this method.
mknod in class FsArchiveFileSystem<E extends FsArchiveEntry>name - the archive file system entry name.type - the type of the archive file system entry to create.options - if CREATE_PARENTS is set, any missing parent
directories will be created and linked into this file
system with its last modification time set to the system's
current time.template - if not null, then the archive file system entry
at the end of the chain shall inherit as much properties from
this entry as possible - with the exception of its name and type.FsArchiveFileSystemOperation.run() method.FsArchiveFileSystemException - If one of the following is true:
name contains characters which are not
supported by the file system.
FILE or DIRECTORY.
FsOutputOption.EXCLUSIVE is set or the entry is a
directory.
createParents is
false.
public void unlink(FsEntryName path) throws FsArchiveFileSystemException
FsArchiveFileSystempath has been successfully deleted from this archive file
system.
If the file system entry is a directory, it must be empty for successful
deletion.unlink in class FsArchiveFileSystem<E extends FsArchiveEntry>path - the archive file system entry name.FsReadOnlyArchiveFileSystemException - If this (virtual) archive
file system is read-only.FsArchiveFileSystemException - If the operation fails for some other
reason.public boolean setTime(FsEntryName path, BitField<Entry.Access> types, long value) throws FsArchiveFileSystemException
setTime in class FsArchiveFileSystem<E extends FsArchiveEntry>FsArchiveFileSystemExceptionCopyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.