|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.vfs.spi.AbstractFSDriver<String>
org.crsh.vfs.spi.servlet.ServletContextDriver
public class ServletContextDriver
| Constructor Summary | |
|---|---|
ServletContextDriver(javax.servlet.ServletContext ctx,
String root)
|
|
| Method Summary | |
|---|---|
Iterable<String> |
children(String parent)
Returns an iterable over the children of of a specific directory handle. |
long |
getLastModified(String handle)
Return the last modified date timestamp of an handle. |
boolean |
isDir(String file)
Returns true if the handle represent a directory. |
String |
name(String file)
Returns the name of the handle. |
Iterator<InputStream> |
open(String handle)
Return an iterator over the resources represented by the specified file handle. |
String |
root()
Returns the root handle. |
URL |
toURL(String file)
The implementation attempts to get an URL that will be valid for the file system first (when the war is usually exploded) and if it is not able, it will delegate to ServletContext.getResource(String). |
| 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 |
| Constructor Detail |
|---|
public ServletContextDriver(javax.servlet.ServletContext ctx,
String root)
| Method Detail |
|---|
public String root()
throws IOException
FSDriver
IOException - any io exception
public String name(String file)
throws IOException
FSDriver
file - the handle
IOException - any io exception
public boolean isDir(String file)
throws IOException
FSDriver
file - the handle
IOException - any io exception
public Iterable<String> children(String parent)
throws IOException
FSDriver
parent - the directory handle
IOException - any io exception
public URL toURL(String file)
throws IOException
ServletContext.getResource(String).
file - the file path
IOException - any io exception
public long getLastModified(String handle)
throws IOException
FSDriver
handle - the handle
IOException - any io exception
public Iterator<InputStream> open(String 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 | |||||||||