org.das2.util.filesystem
Class SubFileSystem

java.lang.Object
  extended by org.das2.util.filesystem.FileSystem
      extended by org.das2.util.filesystem.SubFileSystem

public class SubFileSystem
extends FileSystem


Nested Class Summary
 
Nested classes/interfaces inherited from class org.das2.util.filesystem.FileSystem
FileSystem.DirectoryEntry, FileSystem.FileSystemOfflineException
 
Field Summary
 
Fields inherited from class org.das2.util.filesystem.FileSystem
logger, PROP_CASE_INSENSITIVE, properties
 
Constructor Summary
protected SubFileSystem(FileSystem parent, java.lang.String dir)
           
 
Method Summary
 FileObject getFileObject(java.lang.String filename)
          return the FileObject that corresponds to the name.
 java.io.File getLocalRoot()
          return the folder that is a local copy of the filesystem.
 boolean isDirectory(java.lang.String filename)
           
 java.lang.String[] listDirectory(java.lang.String directory)
          returns a list of the names of the files in a directory.
 java.lang.String[] listDirectory(java.lang.String directory, java.lang.String regex)
          returns a list of the names of the files in a directory that match regex.
 
Methods inherited from class org.das2.util.filesystem.FileSystem
create, createFileSystem, getProperty, getRootURL, registerFileSystemFactory, settings, splitUrl, toCanonicalFilename, toCanonicalFolderName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubFileSystem

protected SubFileSystem(FileSystem parent,
                        java.lang.String dir)
                 throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException
Method Detail

getFileObject

public FileObject getFileObject(java.lang.String filename)
Description copied from class: FileSystem
return the FileObject that corresponds to the name.

Specified by:
getFileObject in class FileSystem

isDirectory

public boolean isDirectory(java.lang.String filename)
                    throws java.io.IOException
Specified by:
isDirectory in class FileSystem
Throws:
java.io.IOException

listDirectory

public java.lang.String[] listDirectory(java.lang.String directory)
                                 throws java.io.IOException
Description copied from class: FileSystem
returns a list of the names of the files in a directory. Names ending in "/" are themselves directories, and the "/" is not part of the name. This is optional, and a directory may or may not be tagged with the trailing slash.

Specified by:
listDirectory in class FileSystem
Throws:
java.io.IOException

listDirectory

public java.lang.String[] listDirectory(java.lang.String directory,
                                        java.lang.String regex)
                                 throws java.io.IOException
Description copied from class: FileSystem
returns a list of the names of the files in a directory that match regex. Trailing slashes on directory names are not part of the name and need not be part of the regex.

Specified by:
listDirectory in class FileSystem
Throws:
java.io.IOException

getLocalRoot

public java.io.File getLocalRoot()
Description copied from class: FileSystem
return the folder that is a local copy of the filesystem. For LocalFilesystem, this is the same as the filesystem. For remote filesystems, this is a folder within their home directory. Note File.getAbsolutePath() returns the string representation of this root.

Specified by:
getLocalRoot in class FileSystem
Returns:
the folder that is a local copy of the filesystem.