IAbstractFileSystem
public class FileSystemImpl extends java.lang.Object implements IAbstractFileSystem
Constructor | Description |
---|---|
FileSystemImpl(java.io.File root) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
exists(java.lang.String name) |
Check whether a file exists.
|
java.io.InputStream |
getInputStream(java.lang.String name) |
Retrieve the named resource as InputStream
|
java.io.File |
getRoot() |
Returns the root folder
|
java.util.Iterator<AbstractFile> |
iterate(java.lang.String name,
int depth) |
Iterate over files under another file, i.e.
|
java.util.List<AbstractFile> |
list(java.lang.String name,
int depth) |
list files under another file, i.e.
|
java.lang.String |
toString() |
public java.io.File getRoot()
IAbstractFileSystem
getRoot
in interface IAbstractFileSystem
public boolean exists(java.lang.String name) throws java.io.IOException
IAbstractFileSystem
exists
in interface IAbstractFileSystem
true
if the named file exists, false
otherwise.java.io.IOException
public java.io.InputStream getInputStream(java.lang.String name) throws java.io.IOException
IAbstractFileSystem
getInputStream
in interface IAbstractFileSystem
java.io.IOException
public java.util.List<AbstractFile> list(java.lang.String name, int depth) throws java.io.IOException
IAbstractFileSystem
list
in interface IAbstractFileSystem
java.io.IOException
public java.util.Iterator<AbstractFile> iterate(java.lang.String name, int depth) throws java.io.IOException
IAbstractFileSystem
iterate
in interface IAbstractFileSystem
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object