|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sitemesh.offline.directory.FileSystemDirectory
public class FileSystemDirectory
Disk backed Directory implementation that uses java.io.File.
Directory| Constructor Summary | |
|---|---|
FileSystemDirectory(File rootDir)
|
|
FileSystemDirectory(File rootDir,
Charset encoding)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileSystemDirectory(File rootDir)
public FileSystemDirectory(File rootDir,
Charset encoding)
| Method Detail |
|---|
public CharBuffer load(String path)
throws IOException
Directory
load in interface DirectoryIOException
public void save(String path,
CharBuffer contents)
throws IOException
Directory
save in interface DirectoryIOException
public List<String> listAllFilePaths()
throws IOException
Directory
listAllFilePaths in interface DirectoryIOException
public void load(String path,
WritableByteChannel channelToWriteTo)
throws IOException
Directory
load in interface DirectoryIOException
public void save(String path,
ReadableByteChannel channelToReadFrom,
int length)
throws IOException
Directory
save in interface DirectoryIOException
public void copy(String path,
Directory destinationDirectory,
String destinationPath)
throws IOException
Directory
copy 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)
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||