public class RAMDriver extends AbstractFSDriver<Path>
Modifier and Type | Field and Description |
---|---|
(package private) URL |
baseURL
.
|
(package private) HashMap<Path,String> |
entries
.
|
private Path |
root
.
|
Constructor and Description |
---|
RAMDriver() |
Modifier and Type | Method and Description |
---|---|
void |
add(Path path,
String file) |
void |
add(String path,
String file) |
Iterable<Path> |
children(Path handle)
Returns an iterable over the children of of a specific directory handle.
|
long |
getLastModified(Path handle)
Return the last modified date timestamp of an handle.
|
boolean |
isDir(Path handle)
Returns true if the handle represent a directory.
|
String |
name(Path handle)
Returns the name of the handle.
|
Iterator<InputStream> |
open(Path handle)
Return an iterator over the resources represented by the specified file handle.
|
Path |
root()
Returns the root handle.
|
child
public RAMDriver()
public Path root() throws IOException
FSDriver
IOException
- any io exceptionpublic String name(Path handle) throws IOException
FSDriver
handle
- the handleIOException
- any io exceptionpublic boolean isDir(Path handle) throws IOException
FSDriver
handle
- the handleIOException
- any io exceptionpublic Iterable<Path> children(Path handle) throws IOException
FSDriver
handle
- the directory handleIOException
- any io exceptionpublic long getLastModified(Path handle) throws IOException
FSDriver
handle
- the handleIOException
- any io exceptionpublic Iterator<InputStream> open(Path handle) throws IOException
FSDriver
handle
- the file handleIOException
- any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.