org.crsh.vfs.spi.file
Class FileDriver
java.lang.Object
org.crsh.vfs.spi.AbstractFSDriver<File>
org.crsh.vfs.spi.file.FileDriver
- All Implemented Interfaces:
- FSDriver<File>
-
public class FileDriver
- extends AbstractFSDriver<File>
-
Field Summary |
private File |
root
. |
Constructor Summary |
FileDriver(File root)
Create a new file driver. |
Method Summary |
Iterable<File> |
children(File handle)
|
long |
getLastModified(File handle)
|
boolean |
isDir(File handle)
|
String |
name(File handle)
|
InputStream |
open(File handle)
|
File |
root()
Returns the root handle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
private final File root
-
.
FileDriver
public FileDriver(File root)
throws NullPointerException
-
Create a new file driver.
- Parameters:
root
- the root
- Throws:
NullPointerException
- if the root argument is null
root
public File root()
throws IOException
- Description copied from interface:
FSDriver
-
Returns the root handle.
-
- Returns:
- the root handle
- Throws:
IOException
- any io exception
name
public String name(File handle)
throws IOException
-
- Throws:
IOException
isDir
public boolean isDir(File handle)
throws IOException
-
- Throws:
IOException
children
public Iterable<File> children(File handle)
throws IOException
-
- Throws:
IOException
getLastModified
public long getLastModified(File handle)
throws IOException
-
- Throws:
IOException
open
public InputStream open(File handle)
throws IOException
-
- Throws:
IOException
Copyright © 2014 eXo Platform SAS. All Rights Reserved.