|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.cotta.physical.PhysicalFileSystem
public class PhysicalFileSystem
File system that represents the physical file.
| Field Summary | |
|---|---|
static PhysicalFileSystem |
instance
|
| Method Summary | |
|---|---|
int |
compare(TPath path1,
TPath path2)
Compares the two path |
void |
createDir(TPath path)
|
void |
createFile(TPath path)
Create file pointed by the given path |
java.nio.channels.FileChannel |
createInputChannel(TPath path)
|
java.io.InputStream |
createInputStream(TPath path)
|
java.nio.channels.FileChannel |
createOutputChannel(TPath path,
java.io.OutputStream outputStream)
|
java.io.OutputStream |
createOutputStream(TPath path,
OutputMode mode)
|
void |
deleteDirectory(TPath path)
|
void |
deleteFile(TPath path)
|
boolean |
dirExists(TPath path)
|
boolean |
equals(TPath path1,
TPath path2)
Check if two paths are equal. |
boolean |
fileExists(TPath path)
|
long |
fileLastModified(TPath path)
|
long |
fileLength(TPath path)
|
int |
hashCode(TPath path)
Returns the hash code for the path |
PathContent |
list(TPath path)
List the content of the path |
void |
moveDirectory(TPath source,
TPath destination)
|
void |
moveFile(TPath source,
TPath destination)
|
java.lang.String |
pathString(TPath path)
|
java.lang.String |
toCanonicalPath(TPath path)
|
java.io.File |
toJavaFile(TPath path)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PhysicalFileSystem instance
| Method Detail |
|---|
public boolean fileExists(TPath path)
fileExists in interface FileSystem
public void createFile(TPath path)
throws TIoException
FileSystem
createFile in interface FileSystempath - path of the file to create
TIoException - error in creating the file
public void deleteFile(TPath path)
throws TIoException
deleteFile in interface FileSystemTIoExceptionpublic boolean dirExists(TPath path)
dirExists in interface FileSystem
public void createDir(TPath path)
throws TIoException
createDir in interface FileSystemTIoException
public PathContent list(TPath path)
throws TIoException
FileSystem
list in interface FileSystempath - path
TIoException - exception from the system. For example, when a direcotry does not exist, a physical system will throw the exception
public java.io.InputStream createInputStream(TPath path)
throws TIoException
createInputStream in interface FileSystemTIoException
public java.io.OutputStream createOutputStream(TPath path,
OutputMode mode)
throws TIoException
createOutputStream in interface FileSystemTIoException
public java.nio.channels.FileChannel createOutputChannel(TPath path,
java.io.OutputStream outputStream)
throws TIoException
createOutputChannel in interface FileSystemTIoException
public void deleteDirectory(TPath path)
throws TIoException
deleteDirectory in interface FileSystemTIoException
public void moveFile(TPath source,
TPath destination)
throws TIoException
moveFile in interface FileSystemTIoException
public void moveDirectory(TPath source,
TPath destination)
throws TIoException
moveDirectory in interface FileSystemTIoExceptionpublic java.lang.String pathString(TPath path)
pathString in interface FileSystempublic long fileLength(TPath path)
fileLength in interface FileSystempublic long fileLastModified(TPath path)
fileLastModified in interface FileSystem
public int compare(TPath path1,
TPath path2)
FileSystem
compare in interface FileSystempath1 - path onepath2 - path two
public boolean equals(TPath path1,
TPath path2)
FileSystem
equals in interface FileSystempath1 - path onepath2 - path two
public int hashCode(TPath path)
FileSystem
hashCode in interface FileSystempath - path
public java.io.File toJavaFile(TPath path)
toJavaFile in interface FileSystempublic java.lang.String toCanonicalPath(TPath path)
toCanonicalPath in interface FileSystem
public java.nio.channels.FileChannel createInputChannel(TPath path)
throws TIoException
createInputChannel in interface FileSystemTIoException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||