public class FileDriver extends AbstractFSDriver<File>
Constructor and Description |
---|
FileDriver(File root)
Create a new file driver.
|
Modifier and Type | Method and Description |
---|---|
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.
|
child
public FileDriver(File root) throws NullPointerException
root
- the rootNullPointerException
- if the root argument is nullpublic File root() throws IOException
FSDriver
IOException
- any io exceptionpublic String name(File handle) throws IOException
FSDriver
handle
- the handleIOException
- any io exceptionpublic boolean isDir(File handle) throws IOException
FSDriver
handle
- the handleIOException
- any io exceptionpublic Iterable<File> children(File handle) throws IOException
FSDriver
handle
- the directory handleIOException
- any io exceptionpublic long getLastModified(File handle) throws IOException
FSDriver
handle
- the handleIOException
- any io exceptionpublic Iterator<InputStream> open(File handle) throws IOException
FSDriver
handle
- the file handleIOException
- any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.