public class LocalFileSystem extends FileSystem
FileSystem.DirectoryEntry, FileSystem.FileSystemOfflineExceptionlogger, loggerUrl, NULL, PROP_CASE_INSENSITIVE, properties| Modifier | Constructor and Description |
|---|---|
protected |
LocalFileSystem(java.net.URI root)
Note the String used to create the URL should have either one or three slashes:
file:/home/jbf or file:///home/jbf
but not file://home/jbf
Also, on Windows, /c:/documents and settings/jbf/ is okay.
|
| Modifier and Type | Method and Description |
|---|---|
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)
return true if the name is a directory.
|
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.
|
java.lang.String |
toString() |
create, create, create, create, create, create, createFileSystem, getExceptionHandler, getListing, getListing, getProperty, getRootURI, listDirectory, listDirectory, listDirectoryDeep, peek, peekInstances, recreate, recreate, registerFileSystemFactory, reset, reset, setExceptionHandler, settings, splitUrl, toCanonicalFilename, toCanonicalFolderName, toCanonicalFolderNameprotected LocalFileSystem(java.net.URI root)
throws FileSystem.FileSystemOfflineException,
java.io.FileNotFoundException
root - FileSystem.FileSystemOfflineExceptionjava.io.FileNotFoundException - if the root does not exist.public boolean isDirectory(java.lang.String filename)
FileSystemisDirectory in class FileSystemfilename - the namepublic java.lang.String[] listDirectory(java.lang.String directory)
FileSystemlistDirectory in class FileSystemdirectory - the directory name within the filesystem.for listings constrained by regular expressions.public java.lang.String[] listDirectory(java.lang.String directory,
java.lang.String regex)
FileSystemlistDirectory in class FileSystemdirectory - the directoryregex - regular expressionpublic java.lang.String toString()
toString in class java.lang.Objectpublic FileObject getFileObject(java.lang.String filename)
FileSystemgetFileObject in class FileSystemfilename - the file name within the filesystempublic java.io.File getLocalRoot()
FileSystemgetLocalRoot in class FileSystem