oscript.fs
Class LocalFileSystem

java.lang.Object
  extended byoscript.fs.AbstractFileSystem
      extended byoscript.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)

Nested Class Summary
 
Nested classes inherited from class oscript.fs.AbstractFileSystem
AbstractFileSystem.BogusFile, AbstractFileSystem.MountPointFile
 
Field Summary
 
Fields inherited from class oscript.fs.AbstractFileSystem
SEPERATOR_CHAR
 
Constructor Summary
LocalFileSystem(java.io.File root)
          Class Constructor.
LocalFileSystem(java.lang.String root)
          Class Constructor.
 
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
 

Constructor Detail

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
Method Detail

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 file
path - 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 file
path - 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