Package | Description |
---|---|
org.refcodes.filesystem | |
org.refcodes.filesystem.impls |
Modifier and Type | Interface and Description |
---|---|
static interface |
FileHandle.MutableFileHandle
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. |
Modifier and Type | Method and Description |
---|---|
FileHandle |
FileSystem.createFile(String aKey)
Creates a file (handle) with the given key.
|
FileHandle |
FileSystem.createFile(String aPath,
String aName)
Creates a file (handle) with the given path and name.
|
FileHandle |
FileHandleAccessor.getFile()
Retrieves the file handle from the file property.
|
FileHandle |
FileSystem.getFileHandle(String aKey)
Gets a file (handle) with the given key from the file system.
|
FileHandle |
FileSystem.getFileHandle(String aPath,
String aName)
Gets a file (handle) with the given path and name from the file system.
|
FileHandle |
FileSystem.moveFile(FileHandle aFileHandle,
String aNewKey)
Renames the file (handle), it will be accessible via the provided key.
|
FileHandle |
FileSystem.renameFile(FileHandle aFileHandle,
String aNewName)
Renames the file (handle), the name part of the key will be renamed to
the new name.
|
FileHandle |
FileHandle.MutableFileHandle.toFileHandle()
Converts the
FileHandle.MutableFileHandle back to a FileHandle
to avoid hassle with collections, the #hashCode() and the
#equals(Object) operations. |
static FileHandle |
FileSystemUtility.toNormalizedFileHandle(FileHandle aFileHandle,
FileSystem aFileSystem)
Test whether the given key may jail break from the name space.
|
Modifier and Type | Method and Description |
---|---|
List<FileHandle> |
FileSystem.getFileHandles(String aPath,
boolean isRecursively)
With the behavior of the
#hasFiles() method, all file (handle)s
found for the path are returned. |
Modifier and Type | Method and Description |
---|---|
void |
FileSystem.deleteFile(FileHandle aFileHandle)
Deletes a file (handle) from the file system.
|
InputStream |
FileSystem.fromFile(FileHandle aFromFileHandle)
An input stream is being provided from which the data of the file
(handle) may be read.
|
void |
FileSystem.fromFile(FileHandle aFromFileHandle,
File aToFile)
The data contained in the given file (handle) is written to the provided
file.
|
void |
FileSystem.fromFile(FileHandle aFromFileHandle,
OutputStream aOutputStream)
The data contained in the given file (handle) is written to the provided
output stream.
|
boolean |
FileSystem.hasFile(FileHandle aFileHandle)
Returns true in case the given file (handle) exists.
|
FileHandle |
FileSystem.moveFile(FileHandle aFileHandle,
String aNewKey)
Renames the file (handle), it will be accessible via the provided key.
|
FileHandle |
FileSystem.renameFile(FileHandle aFileHandle,
String aNewName)
Renames the file (handle), the name part of the key will be renamed to
the new name.
|
OutputStream |
FileSystem.toFile(FileHandle aToFileHandle)
Returns an output stream which may be used to write (or append, in case
data did already exist for the file system) data to a file (handle).
|
void |
FileSystem.toFile(FileHandle aToFileHandle,
byte[] aBuffer)
Data provided by the given buffer is written to the file (handle) (or
appended to the file (handle)'s data in case the file (handle) did
already contain data).
|
void |
FileSystem.toFile(FileHandle aToFileHandle,
File aFromFile)
Data provided by the given input stream is written to the file (handle)
(or appended to the file (handle)'s data in case the file (handle) did
already contain data).
|
void |
FileSystem.toFile(FileHandle aToFileHandle,
InputStream aInputStream)
Data provided by the given input stream is written to the file (handle)
(or appended to the file (handle)'s data in case the file (handle) did
already contain data).
|
static FileHandle |
FileSystemUtility.toNormalizedFileHandle(FileHandle aFileHandle,
FileSystem aFileSystem)
Test whether the given key may jail break from the name space.
|
Modifier and Type | Class and Description |
---|---|
class |
FileHandleImpl
Straight forward implementation of the
FileHandle , |
class |
FileHandleImpl.MutableFileHandleImpl
The implementation of a
MutableFileHandle .
-------------------------------------------------------------------------
CAUTION: fiddling with the path and the name attributes causes the
FileHandleImpl.MutableFileHandleImpl.hashCode() and FileHandleImpl.MutableFileHandleImpl.equals(Object) methods to change
behavior which can cause problems especially in collections! |
Modifier and Type | Method and Description |
---|---|
FileHandle |
InMemoryFileSystemImpl.createFile(String aKey) |
FileHandle |
ChangeRootFileSystemWrapperImpl.createFile(String aKey) |
FileHandle |
InMemoryFileSystemImpl.createFile(String aPath,
String aName) |
FileHandle |
ChangeRootFileSystemWrapperImpl.createFile(String aPath,
String aName) |
FileHandle |
InMemoryFileSystemImpl.getFileHandle(String aKey) |
FileHandle |
ChangeRootFileSystemWrapperImpl.getFileHandle(String aKey) |
FileHandle |
InMemoryFileSystemImpl.getFileHandle(String aPath,
String aName) |
FileHandle |
ChangeRootFileSystemWrapperImpl.getFileHandle(String aPath,
String aName) |
FileHandle |
InMemoryFileSystemImpl.moveFile(FileHandle aFileHandle,
String aNewKey) |
FileHandle |
ChangeRootFileSystemWrapperImpl.moveFile(FileHandle aFileHandle,
String aNewKey) |
FileHandle |
InMemoryFileSystemImpl.renameFile(FileHandle aFileHandle,
String aNewName) |
FileHandle |
ChangeRootFileSystemWrapperImpl.renameFile(FileHandle aFileHandle,
String aNewName) |
FileHandle |
FileHandleImpl.MutableFileHandleImpl.toFileHandle() |
Modifier and Type | Method and Description |
---|---|
List<FileHandle> |
InMemoryFileSystemImpl.getFileHandles(String aPath,
boolean isRecursively) |
List<FileHandle> |
ChangeRootFileSystemWrapperImpl.getFileHandles(String aPath,
boolean isRecursively) |
Modifier and Type | Method and Description |
---|---|
void |
InMemoryFileSystemImpl.deleteFile(FileHandle aFileHandle) |
void |
ChangeRootFileSystemWrapperImpl.deleteFile(FileHandle aFileHandle) |
InputStream |
InMemoryFileSystemImpl.fromFile(FileHandle aFromFileHandle) |
InputStream |
ChangeRootFileSystemWrapperImpl.fromFile(FileHandle aFromFileHandle) |
void |
InMemoryFileSystemImpl.fromFile(FileHandle aFromFileHandle,
File aToFile) |
void |
ChangeRootFileSystemWrapperImpl.fromFile(FileHandle aFromFileHandle,
File aToFile) |
void |
InMemoryFileSystemImpl.fromFile(FileHandle aFromFileHandle,
OutputStream aOutputStream) |
void |
ChangeRootFileSystemWrapperImpl.fromFile(FileHandle aFromFileHandle,
OutputStream aOutputStream) |
boolean |
InMemoryFileSystemImpl.hasFile(FileHandle aFileHandle) |
boolean |
ChangeRootFileSystemWrapperImpl.hasFile(FileHandle aFileHandle) |
FileHandle |
InMemoryFileSystemImpl.moveFile(FileHandle aFileHandle,
String aNewKey) |
FileHandle |
ChangeRootFileSystemWrapperImpl.moveFile(FileHandle aFileHandle,
String aNewKey) |
FileHandle |
InMemoryFileSystemImpl.renameFile(FileHandle aFileHandle,
String aNewName) |
FileHandle |
ChangeRootFileSystemWrapperImpl.renameFile(FileHandle aFileHandle,
String aNewName) |
OutputStream |
InMemoryFileSystemImpl.toFile(FileHandle aToFileHandle) |
OutputStream |
ChangeRootFileSystemWrapperImpl.toFile(FileHandle aToFileHandle) |
void |
InMemoryFileSystemImpl.toFile(FileHandle aToFileHandle,
byte[] aBuffer) |
void |
ChangeRootFileSystemWrapperImpl.toFile(FileHandle aToFileHandle,
byte[] aBuffer) |
void |
InMemoryFileSystemImpl.toFile(FileHandle aToFileHandle,
File aFromFile) |
void |
ChangeRootFileSystemWrapperImpl.toFile(FileHandle aToFileHandle,
File aFromFile) |
void |
InMemoryFileSystemImpl.toFile(FileHandle aToFileHandle,
InputStream aInputStream) |
void |
ChangeRootFileSystemWrapperImpl.toFile(FileHandle aToFileHandle,
InputStream aInputStream) |
Constructor and Description |
---|
FileHandleImpl(FileHandle aFileHandle)
Constructs a
FileHandle object with the properties of the given
FileHandle . |
MutableFileHandleImpl(FileHandle aFileHandle) |
Copyright © 2017. All rights reserved.