Module org.refcodes.filesystem
Package org.refcodes.filesystem
Interface FileHandle.MutableFileHandle
- All Superinterfaces:
org.refcodes.mixin.CreatedDateAccessor
,org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutator
,org.refcodes.mixin.CreatedDateAccessor.CreatedDateProperty
,FileHandle
,FileSizeAccessor
,FileSizeAccessor.FileSizeMutator
,FileSizeAccessor.FileSizeProperty
,org.refcodes.mixin.ModifiedDateAccessor
,org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutator
,org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateProperty
,org.refcodes.mixin.NameAccessor
,org.refcodes.mixin.NameAccessor.NameMutator
,org.refcodes.mixin.NameAccessor.NameProperty
,org.refcodes.mixin.PathAccessor
,org.refcodes.mixin.PathAccessor.PathMutator
,org.refcodes.mixin.PathAccessor.PathProperty
- All Known Implementing Classes:
FileHandleImpl.MutableFileHandleImpl
- Enclosing interface:
- FileHandle
public static interface FileHandle.MutableFileHandle
extends FileHandle, org.refcodes.mixin.PathAccessor.PathProperty, org.refcodes.mixin.NameAccessor.NameProperty, FileSizeAccessor.FileSizeProperty, org.refcodes.mixin.CreatedDateAccessor.CreatedDateProperty, org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateProperty
The mutable
FileHandle
allows the modification of (fiddling
around with) attributes.
-------------------------------------------------------------------------
ATTENTION: Usually fiddling around with attributes is not necessary, as
the FileSystem
itself provides the sufficient functionality to
work with files. In some cases though this might be necessary: This class
is being provided to allow modification of file attributes while making
sure that the FileHandle
itself creates a copy so that any
additional attributes provided by extensions of this interface of whom
the developer does not know (yet) are preserved. So extensions of the
FileHandle
know how to create a FileHandle.MutableFileHandle
without
information loss, the business logic does not require to take care of any
yet unknown extensions.
-------------------------------------------------------------------------
CAUTION: Working with modified FileHandle
s on the
FileSystem
can aCause unexpected (severe) behavior (data loss),
so we assume that you know what you do when using the
FileHandle.MutableFileHandle
!-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.CreatedDateAccessor
org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutator, org.refcodes.mixin.CreatedDateAccessor.CreatedDateProperty
Nested classes/interfaces inherited from interface org.refcodes.filesystem.FileHandle
FileHandle.MutableFileHandle
Nested classes/interfaces inherited from interface org.refcodes.filesystem.FileSizeAccessor
FileSizeAccessor.FileSizeBuilder<B extends FileSizeAccessor.FileSizeBuilder<B>>, FileSizeAccessor.FileSizeMutator, FileSizeAccessor.FileSizeProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.ModifiedDateAccessor
org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutator, org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor
org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.PathAccessor
org.refcodes.mixin.PathAccessor.PathBuilder<B extends org.refcodes.mixin.PathAccessor.PathBuilder<?>>, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathProperty
-
Method Summary
Modifier and TypeMethodDescriptionConverts theFileHandle.MutableFileHandle
back to aFileHandle
to avoid hassle with collections, theObject.hashCode()
and theObject.equals(Object)
operations.Methods inherited from interface org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutator
setCreatedDate
Methods inherited from interface org.refcodes.mixin.CreatedDateAccessor.CreatedDateProperty
letCreatedDate
Methods inherited from interface org.refcodes.filesystem.FileHandle
getCreatedDate, getFileSize, getModifiedDate, getName, getPath, toKey, toMutableFileHandle
Methods inherited from interface org.refcodes.filesystem.FileSizeAccessor.FileSizeMutator
setFileSize
Methods inherited from interface org.refcodes.filesystem.FileSizeAccessor.FileSizeProperty
letFileSize
Methods inherited from interface org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutator
setModifiedDate
Methods inherited from interface org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateProperty
letModifiedDate
Methods inherited from interface org.refcodes.mixin.NameAccessor.NameMutator
setName
Methods inherited from interface org.refcodes.mixin.NameAccessor.NameProperty
letName
Methods inherited from interface org.refcodes.mixin.PathAccessor.PathMutator
setPath
Methods inherited from interface org.refcodes.mixin.PathAccessor.PathProperty
letPath
-
Method Details
-
toFileHandle
FileHandle toFileHandle()Converts theFileHandle.MutableFileHandle
back to aFileHandle
to avoid hassle with collections, theObject.hashCode()
and theObject.equals(Object)
operations.- Returns:
- An immutable
FileHandle
from thisFileHandle.MutableFileHandle
.
-