|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileSystem
This is the Terrier File Abstraction Layer interface depicting the operations available for a file system.
Method Summary | |
---|---|
boolean |
canRead(java.lang.String filename)
returns true if filename can be read |
boolean |
canWrite(java.lang.String filename)
returns true if filename can be written to |
byte |
capabilities()
capabilities of the filesystem |
boolean |
delete(java.lang.String filename)
delete the named file |
boolean |
deleteOnExit(java.lang.String pathname)
delete the file after the JVM exits |
boolean |
exists(java.lang.String filename)
returns true if the path exists |
java.lang.String |
getParent(java.lang.String path)
whats the parent path to this path - eg directory containing a file |
boolean |
isDirectory(java.lang.String path)
returns true if path is a directory |
long |
length(java.lang.String filename)
returns the length of the specified file |
java.lang.String[] |
list(java.lang.String path)
list contents of a directory etc |
boolean |
mkdir(java.lang.String filename)
mkdir the specified path |
java.lang.String |
name()
returns a name for the filesystem |
RandomDataInput |
openFileRandom(java.lang.String filename)
open a file for random input |
java.io.InputStream |
openFileStream(java.lang.String filename)
open a file of given filename for readinng |
boolean |
rename(java.lang.String source,
java.lang.String destination)
rename a file/dir to another name, on the same file system |
java.lang.String[] |
schemes()
URI schemes supported by this class |
RandomDataOutput |
writeFileRandom(java.lang.String filename)
open a file of given filename for random writing |
java.io.OutputStream |
writeFileStream(java.lang.String filename)
open a file of given filename for writing |
Method Detail |
---|
java.lang.String name()
byte capabilities()
java.lang.String[] schemes()
boolean exists(java.lang.String filename) throws java.io.IOException
java.io.IOException
boolean canRead(java.lang.String filename) throws java.io.IOException
java.io.IOException
boolean canWrite(java.lang.String filename) throws java.io.IOException
java.io.IOException
java.io.InputStream openFileStream(java.lang.String filename) throws java.io.IOException
java.io.IOException
RandomDataInput openFileRandom(java.lang.String filename) throws java.io.IOException
java.io.IOException
java.io.OutputStream writeFileStream(java.lang.String filename) throws java.io.IOException
java.io.IOException
RandomDataOutput writeFileRandom(java.lang.String filename) throws java.io.IOException
java.io.IOException
boolean delete(java.lang.String filename) throws java.io.IOException
java.io.IOException
boolean deleteOnExit(java.lang.String pathname) throws java.io.IOException
java.io.IOException
boolean mkdir(java.lang.String filename) throws java.io.IOException
java.io.IOException
long length(java.lang.String filename) throws java.io.IOException
java.io.IOException
boolean isDirectory(java.lang.String path) throws java.io.IOException
java.io.IOException
boolean rename(java.lang.String source, java.lang.String destination) throws java.io.IOException
java.io.IOException
java.lang.String getParent(java.lang.String path) throws java.io.IOException
java.io.IOException
java.lang.String[] list(java.lang.String path) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |