Package | Description |
---|---|
org.refcodes.filesystem | |
org.refcodes.filesystem.exceptions.impls | |
org.refcodes.filesystem.impls | |
org.refcodes.filesystem.mixins | |
org.refcodes.filesystem.utilities |
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 |
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. |
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).
|
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)
Creates a file (handle) with the given key.
|
FileHandle |
VirtualFileSystemWrapperImpl.createFile(String aKey)
Creates a file (handle) with the given key.
|
FileHandle |
InMemoryFileSystemImpl.createFile(String aPath,
String aName)
Creates a file (handle) with the given path and name.
|
FileHandle |
VirtualFileSystemWrapperImpl.createFile(String aPath,
String aName)
Creates a file (handle) with the given path and name.
|
FileHandle |
InMemoryFileSystemImpl.getFileHandle(String aKey)
Gets a file (handle) with the given key from the file system.
|
FileHandle |
VirtualFileSystemWrapperImpl.getFileHandle(String aKey)
Gets a file (handle) with the given key from the file system.
|
FileHandle |
InMemoryFileSystemImpl.getFileHandle(String aPath,
String aName)
Gets a file (handle) with the given path and name from the file system.
|
FileHandle |
VirtualFileSystemWrapperImpl.getFileHandle(String aPath,
String aName)
Gets a file (handle) with the given path and name from the file system.
|
FileHandle |
InMemoryFileSystemImpl.moveFile(FileHandle aFileHandle,
String aNewKey)
Renames the file (handle), it will be accessible via the provided key.
|
FileHandle |
VirtualFileSystemWrapperImpl.moveFile(FileHandle aFileHandle,
String aNewKey)
Renames the file (handle), it will be accessible via the provided key.
|
FileHandle |
InMemoryFileSystemImpl.renameFile(FileHandle aFileHandle,
String aNewName)
Renames the file (handle), the name part of the key will be renamed to
the new name.
|
FileHandle |
VirtualFileSystemWrapperImpl.renameFile(FileHandle aFileHandle,
String aNewName)
Renames the file (handle), the name part of the key will be renamed to
the new name.
|
FileHandle |
FileHandleImpl.MutableFileHandleImpl.toFileHandle()
Converts the
FileHandle.MutableFileHandle back to a FileHandle
to avoid hassle with collections, the #hashCode() and the
#equals(Object) operations. |
Modifier and Type | Method and Description |
---|---|
List<FileHandle> |
InMemoryFileSystemImpl.getFileHandles(String aPath,
boolean isRecursively)
With the behavior of the
#hasFiles() method, all file (handle)s
found for the path are returned. |
List<FileHandle> |
VirtualFileSystemWrapperImpl.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 |
InMemoryFileSystemImpl.deleteFile(FileHandle aFileHandle)
Deletes a file (handle) from the file system.
|
void |
VirtualFileSystemWrapperImpl.deleteFile(FileHandle aFileHandle)
Deletes a file (handle) from the file system.
|
InputStream |
InMemoryFileSystemImpl.fromFile(FileHandle aFromFileHandle)
An input stream is being provided from which the data of the file
(handle) may be read.
|
InputStream |
VirtualFileSystemWrapperImpl.fromFile(FileHandle aFromFileHandle)
An input stream is being provided from which the data of the file
(handle) may be read.
|
void |
InMemoryFileSystemImpl.fromFile(FileHandle aFromFileHandle,
File aToFile)
The data contained in the given file (handle) is written to the provided
file.
|
void |
VirtualFileSystemWrapperImpl.fromFile(FileHandle aFromFileHandle,
File aToFile)
The data contained in the given file (handle) is written to the provided
file.
|
void |
InMemoryFileSystemImpl.fromFile(FileHandle aFromFileHandle,
OutputStream aOutputStream)
The data contained in the given file (handle) is written to the provided
output stream.
|
void |
VirtualFileSystemWrapperImpl.fromFile(FileHandle aFromFileHandle,
OutputStream aOutputStream)
The data contained in the given file (handle) is written to the provided
output stream.
|
boolean |
InMemoryFileSystemImpl.hasFile(FileHandle aFileHandle)
Returns true in case the given file (handle) exists.
|
boolean |
VirtualFileSystemWrapperImpl.hasFile(FileHandle aFileHandle)
Returns true in case the given file (handle) exists.
|
FileHandle |
InMemoryFileSystemImpl.moveFile(FileHandle aFileHandle,
String aNewKey)
Renames the file (handle), it will be accessible via the provided key.
|
FileHandle |
VirtualFileSystemWrapperImpl.moveFile(FileHandle aFileHandle,
String aNewKey)
Renames the file (handle), it will be accessible via the provided key.
|
FileHandle |
InMemoryFileSystemImpl.renameFile(FileHandle aFileHandle,
String aNewName)
Renames the file (handle), the name part of the key will be renamed to
the new name.
|
FileHandle |
VirtualFileSystemWrapperImpl.renameFile(FileHandle aFileHandle,
String aNewName)
Renames the file (handle), the name part of the key will be renamed to
the new name.
|
OutputStream |
InMemoryFileSystemImpl.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).
|
OutputStream |
VirtualFileSystemWrapperImpl.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 |
InMemoryFileSystemImpl.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 |
VirtualFileSystemWrapperImpl.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 |
InMemoryFileSystemImpl.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 |
VirtualFileSystemWrapperImpl.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 |
InMemoryFileSystemImpl.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).
|
void |
VirtualFileSystemWrapperImpl.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).
|
Constructor and Description |
---|
FileHandleImpl(FileHandle aFileHandle)
Constructs a
FileHandle object with the properties of the given
FileHandle . |
MutableFileHandleImpl(FileHandle aFileHandle) |
Modifier and Type | Method and Description |
---|---|
FileHandle |
FileHandleAccessor.getFile()
Retrieves the file handle from the file property.
|
Modifier and Type | Method and Description |
---|---|
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 |
---|---|
static FileHandle |
FileSystemUtility.toNormalizedFileHandle(FileHandle aFileHandle,
FileSystem aFileSystem)
Test whether the given key may jail break from the name space.
|
Copyright © 2015. All rights reserved.