|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.util.filesystem.FileSystem
public abstract class FileSystem
Filesystems provide an abstraction layer so that clients can access any heirarchy of files in a implementation-independent way. For example, remote filesystems accessible via http are accessible through the same interface as a local filesystem.
Nested Class Summary | |
---|---|
class |
FileSystem.DirectoryEntry
DirectoryEntry defines a structure for containing directory entry data. |
static class |
FileSystem.FileSystemOfflineException
|
Field Summary | |
---|---|
protected static java.util.logging.Logger |
logger
|
static java.lang.String |
PROP_CASE_INSENSITIVE
Boolean.TRUE if the filesystem ignores case, such as Windows local filesystem. |
protected java.util.HashMap |
properties
|
Constructor Summary | |
---|---|
protected |
FileSystem(java.net.URL root)
|
Method Summary | |
---|---|
static FileSystem |
create(java.net.URL root)
Creates a FileSystem by parsing the URL and creating the correct FS type. |
FileSystem |
createFileSystem(java.lang.String directory)
create a new filesystem that is a part of this filesystem, rooted at directory. |
abstract FileObject |
getFileObject(java.lang.String filename)
return the FileObject that corresponds to the name. |
abstract java.io.File |
getLocalRoot()
return the folder that is a local copy of the filesystem. |
java.lang.Object |
getProperty(java.lang.String name)
|
java.net.URL |
getRootURL()
|
abstract boolean |
isDirectory(java.lang.String filename)
|
abstract java.lang.String[] |
listDirectory(java.lang.String directory)
returns a list of the names of the files in a directory. |
abstract 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. |
static void |
registerFileSystemFactory(java.lang.String proto,
FileSystemFactory factory)
|
static FileSystemSettings |
settings()
|
static java.lang.String[] |
splitUrl(java.lang.String surl)
returns a String[5]: [0] is proto "http://" [1] will be the host [2] is proto + path [3] is proto + path + file [4] is file ext [5] is params, not including ?. |
protected static java.lang.String |
toCanonicalFilename(java.lang.String filename)
returns the canonical name /a/b/c.dat of a string that contains backslashes and might not have the leading / and trailing slashes. |
protected static java.lang.String |
toCanonicalFolderName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.logging.Logger logger
public static final java.lang.String PROP_CASE_INSENSITIVE
protected java.util.HashMap properties
Constructor Detail |
---|
protected FileSystem(java.net.URL root)
Method Detail |
---|
public static FileSystem create(java.net.URL root) throws FileSystem.FileSystemOfflineException
FileSystem.FileSystemOfflineException
public static FileSystemSettings settings()
public static void registerFileSystemFactory(java.lang.String proto, FileSystemFactory factory)
public java.net.URL getRootURL()
protected static java.lang.String toCanonicalFilename(java.lang.String filename)
protected static java.lang.String toCanonicalFolderName(java.lang.String name)
public abstract FileObject getFileObject(java.lang.String filename)
public abstract boolean isDirectory(java.lang.String filename) throws java.io.IOException
java.io.IOException
public abstract java.lang.String[] listDirectory(java.lang.String directory) throws java.io.IOException
java.io.IOException
public abstract java.lang.String[] listDirectory(java.lang.String directory, java.lang.String regex) throws java.io.IOException
java.io.IOException
public java.lang.Object getProperty(java.lang.String name)
public abstract java.io.File getLocalRoot()
public FileSystem createFileSystem(java.lang.String directory)
public static java.lang.String[] splitUrl(java.lang.String surl)
surl
- an url string to parse.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |