|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoscript.fs.AbstractFileSystem.BogusFile
A non-existant file which is created to simulate non-existant directories that are in a path to a mount point, or files which simply don't exist.
Method Summary | |
boolean |
canRead()
Is it possible to read from this file. |
boolean |
canWrite()
Is it possible to write to this file. |
boolean |
createNewFile()
Create a new empty file, if it does not yet exist. |
boolean |
delete()
Delete this file. |
boolean |
equals(java.lang.Object obj)
|
boolean |
exists()
Tests whether this file exists. |
java.lang.String |
getExtension()
Get the extension, which indicates the type of file. |
java.io.InputStream |
getInputStream()
Get an input stream to read from this file. |
java.lang.String |
getName()
Get the name of this file, which is the last component of the complete path. |
java.io.OutputStream |
getOutputStream(boolean append)
Get an output stream to write to this file. |
java.lang.String |
getPath()
Get the file path, which globally identifies the file. |
int |
hashCode()
|
boolean |
isDirectory()
Test whether this file is a directory. |
boolean |
isFile()
Test whether this file is a regular file. |
long |
lastModified()
Return the time of last modification. |
long |
length()
Return the length of the file in bytes. |
boolean |
mkdir()
If this file does not exist, create it as a directory. |
boolean |
mkdirs()
If this file does not exist, create it as a directory. |
java.lang.String |
toString()
|
void |
touch()
Update the timestamp on this file to the current time. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.io.InputStream getInputStream() throws java.io.IOException
AbstractFile
getInputStream
in interface AbstractFile
java.io.IOException
AbstractFile.canRead()
public java.io.OutputStream getOutputStream(boolean append) throws java.io.IOException
AbstractFile
getOutputStream
in interface AbstractFile
java.io.IOException
AbstractFile.canWrite()
public java.lang.String getPath()
AbstractFile
getPath
in interface AbstractFile
AbstractFile.getName()
public java.lang.String getName()
AbstractFile
getName
in interface AbstractFile
AbstractFile.getPath()
public long lastModified()
AbstractFile
AbstractFile
representing the same
"file", but created at a later time, should return X if the file has not
been modified, or >X if the file has been modified.
lastModified
in interface AbstractFile
public long length()
AbstractFile
length
in interface AbstractFile
public boolean canRead()
AbstractFile
canRead
in interface AbstractFile
public boolean canWrite()
AbstractFile
canWrite
in interface AbstractFile
public boolean exists()
AbstractFile
exists
in interface AbstractFile
true
iff the file existspublic boolean isDirectory()
AbstractFile
isDirectory
in interface AbstractFile
true
iff this file is a directorypublic boolean isFile()
AbstractFile
isFile
in interface AbstractFile
true
iff this file is a regular file.public boolean createNewFile() throws java.io.IOException
AbstractFile
createNewFile
in interface AbstractFile
true
iff the file does not exist and was successfully
created.
java.io.IOException
public void touch()
AbstractFile
touch
in interface AbstractFile
public boolean delete() throws java.io.IOException
AbstractFile
delete
in interface AbstractFile
true iff the directory is successfully deleted.
- Throws:
java.io.IOException
public boolean mkdir() throws java.io.IOException
AbstractFile
mkdir
in interface AbstractFile
true
iff directory successfully created
java.io.IOException
public boolean mkdirs() throws java.io.IOException
AbstractFile
mkdirs
in interface AbstractFile
true
iff directory successfully created
java.io.IOException
public java.lang.String getExtension()
AbstractFile
getExtension
in interface AbstractFile
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |