|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.vfs.spi.AbstractFSDriver<File> org.crsh.vfs.spi.file.FileDriver
public class FileDriver
Field Summary | |
---|---|
private File |
root
. |
Constructor Summary | |
---|---|
FileDriver(File root)
Create a new file driver. |
Method Summary | |
---|---|
Iterable<File> |
children(File handle)
Returns an iterable over the children of of a specific directory handle. |
long |
getLastModified(File handle)
Return the last modified date timestamp of an handle. |
boolean |
isDir(File handle)
Returns true if the handle represent a directory. |
String |
name(File handle)
Returns the name of the handle. |
Iterator<InputStream> |
open(File handle)
Return an iterator over the resources represented by the specified file handle. |
File |
root()
Returns the root handle. |
Methods inherited from class org.crsh.vfs.spi.AbstractFSDriver |
---|
child |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final File root
Constructor Detail |
---|
public FileDriver(File root) throws NullPointerException
root
- the root
NullPointerException
- if the root argument is nullMethod Detail |
---|
public File root() throws IOException
FSDriver
IOException
- any io exceptionpublic String name(File handle) throws IOException
FSDriver
handle
- the handle
IOException
- any io exceptionpublic boolean isDir(File handle) throws IOException
FSDriver
handle
- the handle
IOException
- any io exceptionpublic Iterable<File> children(File handle) throws IOException
FSDriver
handle
- the directory handle
IOException
- any io exceptionpublic long getLastModified(File handle) throws IOException
FSDriver
handle
- the handle
IOException
- any io exceptionpublic Iterator<InputStream> open(File handle) throws IOException
FSDriver
handle
- the file handle
IOException
- any io exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |