oscript.fs
Class LocalFileSystem
java.lang.Object
oscript.fs.AbstractFileSystem
oscript.fs.LocalFileSystem
- public class LocalFileSystem
- extends AbstractFileSystem
An implementation of oscript.AbstractFileSystem
for the local
filesystem.
- Version:
- 1.15
- Author:
- Rob Clark (rob@ti.com)
Method Summary |
protected java.util.Collection |
childrenInFileSystem(java.lang.String mountPath,
java.lang.String path)
Return an iterator of children of the specified path. |
protected void |
flush()
Flush any pending changes within this filesystem. |
protected AbstractFile |
resolveInFileSystem(java.lang.String mountPath,
java.lang.String path)
Try to resolve the specified path. |
Methods inherited from class oscript.fs.AbstractFileSystem |
basename, children, children, dirname, getCwd, lastModified, mount, normalize, normalize, resolve, setCwd, touchMountPoint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalFileSystem
public LocalFileSystem(java.io.File root)
- Class Constructor.
- Parameters:
root
- the root of the local filesystem
LocalFileSystem
public LocalFileSystem(java.lang.String root)
- Class Constructor.
- Parameters:
root
- the root of the local filesystem
resolveInFileSystem
protected AbstractFile resolveInFileSystem(java.lang.String mountPath,
java.lang.String path)
- Try to resolve the specified path. If unresolved, return
null
.
- Specified by:
resolveInFileSystem
in class AbstractFileSystem
- Parameters:
mountPath
- the path this fs is mounted at to resolve the requested filepath
- path to file
- Returns:
- file or
null
childrenInFileSystem
protected java.util.Collection childrenInFileSystem(java.lang.String mountPath,
java.lang.String path)
- Return an iterator of children of the specified path.
- Specified by:
childrenInFileSystem
in class AbstractFileSystem
- Parameters:
mountPath
- the path this fs is mounted at to resolve the requested filepath
- path to file, relative to mountPath
- Returns:
- a collection of
AbstractFile
flush
protected void flush()
throws java.io.IOException
- Flush any pending changes within this filesystem.
- Specified by:
flush
in class AbstractFileSystem
- Throws:
java.io.IOException