| Constructor and Description |
|---|
FileSystemDirectory(File rootDir) |
FileSystemDirectory(File rootDir,
Charset encoding) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(String path,
Directory destinationDirectory,
String destinationPath)
Copy a file from this directory to another location.
|
boolean |
equals(Object o) |
File |
getFileByPath(String path)
new ReadableByteChannel() {
public int read(ByteBuffer dst) throws IOException {
ByteBuffer buffer = dst.put(sourceData);
return buffer.position();
}
public boolean isOpen() {
return true;
}
public void close() throws IOException {
}
}
|
int |
hashCode() |
List<String> |
listAllFilePaths()
Get a list of all file paths (relative to the Directory).
|
CharBuffer |
load(String path)
Load the contents from a file.
|
void |
load(String path,
WritableByteChannel channelToWriteTo)
Load binary data.
|
void |
save(String path,
CharBuffer contents)
Save the contents to a file, overwriting any existing content.
|
void |
save(String path,
ReadableByteChannel channelToReadFrom,
int length)
Save binary data.
|
String |
toString() |
public FileSystemDirectory(File rootDir)
public CharBuffer load(String path) throws IOException
Directoryload in interface DirectoryIOExceptionpublic void save(String path, CharBuffer contents) throws IOException
Directorysave in interface DirectoryIOExceptionpublic List<String> listAllFilePaths() throws IOException
DirectorylistAllFilePaths in interface DirectoryIOExceptionpublic void load(String path, WritableByteChannel channelToWriteTo) throws IOException
Directoryload in interface DirectoryIOExceptionpublic void save(String path, ReadableByteChannel channelToReadFrom, int length) throws IOException
Directorysave in interface DirectoryIOExceptionpublic void copy(String path, Directory destinationDirectory, String destinationPath) throws IOException
Directorycopy in interface Directorypath - Path of file to copy (from this Directory)destinationDirectory - Target directory (may be this)destinationPath - Path under target directory.IOExceptionpublic File getFileByPath(String path)
Copyright © 2015. All Rights Reserved.