org.das2.util.filesystem
Class SubFileSystem
java.lang.Object
org.das2.util.filesystem.FileSystem
org.das2.util.filesystem.SubFileSystem
public class SubFileSystem
- extends FileSystem
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubFileSystem
protected SubFileSystem(FileSystem parent,
java.lang.String dir)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
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.