|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.itr_rescue.dataGuard.localFileSystem.JFMFileSystem org.itr_rescue.dataGuard.localFileSystem.JFMLocalFilesystem
public class JFMLocalFilesystem
TODO change me!!!
Constructor Summary | |
---|---|
JFMLocalFilesystem()
|
Method Summary | |
---|---|
boolean |
canRead(JFMFile file)
Tests whether the application can read the file denoted by the abstract pathname. |
boolean |
canWrite(JFMFile file)
Tests whether the application can modify to the file denoted by the abstract pathname. |
boolean |
createNewFile(JFMFile file)
|
boolean |
createNewFile(JFMFile parent,
java.lang.String name)
Atomically creates a new, empty file named by the abstract pathname if and only if a file with that name does not yet exist. |
boolean |
delete(JFMFile file)
Deletes the file or directory denoted by the abstract pathname. |
boolean |
exists(JFMFile file)
Tests whether the file or directory denoted by the abstract pathname exists. |
JFMFile |
getDefaultRootDirectory()
The default root directory in the case of filesystems with more than one root directories (like windows) |
JFMFile |
getFile(java.lang.String pathName)
This method returns an JFMFile object based on the pathname provided |
char |
getPathSeparator()
The system-dependent path-separator character. |
char |
getSeparator()
The system-dependent default name-separator character. |
JFMFile |
getStartDirectory()
This method returns the start directory for this filesystem |
boolean |
isLocal()
Tells us if the filesystem is local. |
JFMFile[] |
listFiles(JFMFile root)
Returns an array of abstract pathnames denoting the files in the directory denoted by the abstract pathname. |
JFMFile[] |
listFiles(JFMFile rootFile,
java.io.FilenameFilter filter)
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. |
JFMFile[] |
listRoots()
List the available filesystem roots. |
boolean |
mkdir(JFMFile file)
|
boolean |
mkdir(JFMFile parent,
java.lang.String name)
Creates the directory named by the abstract pathname denoted by the parameter. |
boolean |
mkdirs(JFMFile file)
|
boolean |
setLastModified(JFMFile file,
long time)
Sets the last-modified time of the file or directory named by the abstract pathname. |
boolean |
setReadOnly(JFMFile file)
Marks the file or directory named by the abstract pathname so that only read operations are allowed. |
Methods inherited from class org.itr_rescue.dataGuard.localFileSystem.JFMFileSystem |
---|
createFileSystem, getPathSeparatorString, getRegisteredFilesystems, getRootDriveFile, getSeparatorString, registerFilesystems |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JFMLocalFilesystem()
Method Detail |
---|
public char getPathSeparator()
JFMFileSystem
path.separator
. This character is used to
separate filenames in a sequence of files given as a path list.
On UNIX systems, this character is ':'
; on Microsoft Windows systems it
is ';'
.
getPathSeparator
in class JFMFileSystem
org.jfm.md.filesystems.JFMFileSystem#getPathSeparator()
public char getSeparator()
JFMFileSystem
file.separator
. On UNIX systems the value of this
field is '/'
; on Microsoft Windows systems it is '\'
.
getSeparator
in class JFMFileSystem
org.jfm.md.filesystems.JFMFileSystem#getSeparator()
public JFMFile getDefaultRootDirectory()
JFMFileSystem
getDefaultRootDirectory
in class JFMFileSystem
org.jfm.md.filesystems.JFMFileSystem#getDefaultRootDirectory()
public JFMFile[] listRoots()
JFMFileSystem
listRoots
in class JFMFileSystem
org.jfm.md.filesystems.JFMFileSystem#listRoots()
public JFMFile[] listFiles(JFMFile root)
JFMFileSystem
If this abstract pathname does not denote a directory, then this
method returns null
. Otherwise an array of
File
objects is returned, one for each file or directory in
the directory. Pathnames denoting the directory itself and the
directory's parent directory are not included in the result.
There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.
listFiles
in class JFMFileSystem
null
if this abstract pathname
does not denote a directory, or if an I/O error occurs.org.jfm.md.filesystems.JFMFileSystem#listFiles()
public JFMFile[] listFiles(JFMFile rootFile, java.io.FilenameFilter filter)
JFMFileSystem
#listFiles()
method, except
that the pathnames in the returned array must satisfy the filter.
If the given filter
is null
then all
pathnames are accepted. Otherwise, a pathname satisfies the filter
if and only if the value true
results when the
FilenameFilter.accept(java.io.File, java.lang.String)
method of the filter is
invoked on this abstract pathname and the name of a file or
directory in the directory that it denotes.
listFiles
in class JFMFileSystem
filter
- A filename filter
null
if this abstract pathname
does not denote a directory, or if an I/O error occurs.org.jfm.md.filesystems.JFMFileSystem#listFiles(java.io.FilenameFilter)
public boolean mkdir(JFMFile file)
org.jfm.md.filesystems.JFMFileSystem#mkdir(org.jfm.md.filesystems.JFMFile)
public boolean mkdirs(JFMFile file)
org.jfm.md.filesystems.JFMFileSystem#mkdirs(org.jfm.md.filesystems.JFMFile)
public boolean delete(JFMFile file)
JFMFileSystem
delete
in class JFMFileSystem
file
- The file that denotes the abstract pathname
true
if and only if the file or directory is
successfully deleted; false
otherwiseorg.jfm.md.filesystems.JFMFileSystem#delete(org.jfm.md.filesystems.JFMFile)
public boolean createNewFile(JFMFile file) throws FSException
FSException
org.jfm.md.filesystems.JFMFileSystem#createNewFile(org.jfm.md.filesystems.JFMFile)
public boolean setLastModified(JFMFile file, long time)
JFMFileSystem
All platforms support file-modification times to the nearest second,
but some provide more precision. The argument will be truncated to fit
the supported precision. If the operation succeeds and no intervening
operations on the file take place, then the next invocation of the
method will return the (possibly
truncated) org.jfm.md.filesystems.JFMFile#lastModified
time
argument that was passed to this method.
setLastModified
in class JFMFileSystem
file
- The file that denotes the abstract pathnametime
- The new last-modified time, measured in milliseconds since
the epoch (00:00:00 GMT, January 1, 1970)
true
if and only if the operation succeeded;
false
otherwiseorg.jfm.md.filesystems.JFMFileSystem#setLastModified(org.jfm.md.filesystems.JFMFile, long)
public boolean setReadOnly(JFMFile file)
JFMFileSystem
setReadOnly
in class JFMFileSystem
file
- The file that denotes the abstract pathname
true
if and only if the operation succeeded;
false
otherwiseorg.jfm.md.filesystems.JFMFileSystem#setReadOnly(org.jfm.md.filesystems.JFMFile)
public boolean canRead(JFMFile file)
JFMFileSystem
canRead
in class JFMFileSystem
file
- The file that denotes the abstract pathname
true
if and only if the file specified by this
abstract pathname exists and can be read by the
application; false
otherwiseorg.jfm.md.filesystems.JFMFileSystem#canRead(org.jfm.md.filesystems.JFMFile)
public boolean canWrite(JFMFile file)
JFMFileSystem
canWrite
in class JFMFileSystem
file
- The file that denotes the abstract pathname
true
if and only if the file system actually
contains a file denoted by this abstract pathname and
the application is allowed to write to the file;
false
otherwise.org.jfm.md.filesystems.JFMFileSystem#canWrite(org.jfm.md.filesystems.JFMFile)
public boolean exists(JFMFile file)
JFMFileSystem
exists
in class JFMFileSystem
file
- The file that denotes the abstract pathname
true
if and only if the file or directory denoted
by this abstract pathname exists; false
otherwiseorg.jfm.md.filesystems.JFMFileSystem#exists(org.jfm.md.filesystems.JFMFile)
public JFMFile getStartDirectory()
JFMFileSystem
getStartDirectory
in class JFMFileSystem
org.jfm.md.filesystems.JFMFileSystem#getStartDirectory()
public JFMFile getFile(java.lang.String pathName)
JFMFileSystem
getFile
in class JFMFileSystem
pathName
- String
org.jfm.md.filesystems.JFMFileSystem#getFile(java.lang.String)
public boolean mkdir(JFMFile parent, java.lang.String name)
JFMFileSystem
mkdir
in class JFMFileSystem
parent
- The parent file that denotes the abstract pathnamename
- The name of the new dir
true
if and only if the directory was
created; false
otherwisepublic boolean createNewFile(JFMFile parent, java.lang.String name) throws FSException
JFMFileSystem
createNewFile
in class JFMFileSystem
true
if the named file does not exist and was
successfully created; false
if the named file
already exists
FSException
- If an filesystem error occurredpublic boolean isLocal()
JFMFileSystem
isLocal
in class JFMFileSystem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |