com.myJava.file.driver.remote
Class FictiveFile
java.lang.Object
java.io.File
com.myJava.file.driver.remote.FictiveFile
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<java.io.File>
public class FictiveFile
- extends java.io.File
This class extends the default "File" structure.
It represents a fictive local or a remote file.
In both cases, it does not exist on the local file system.
It does not redefine fileSystem actions such as "delete", "mkdir", ... (these actions are the resposibility of the FileSystemDriver)
but keep technical informations in cache such as file size, isDirectory, ... (to avoid making multiple remote accesses for the same file)
- Author:
- Olivier PETRUCCI
Areca Build ID : 7299034069467778562
- See Also:
- Serialized Form
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary |
FictiveFile(java.lang.String localPath,
java.lang.String remotePath,
AbstractRemoteFileSystemDriver driver)
|
FictiveFile(java.lang.String localPath,
java.lang.String remotePath,
long remoteLength,
boolean remoteDirectory,
boolean remoteExists,
long remoteTs)
|
Methods inherited from class java.io.File |
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isHidden, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toURI, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
FictiveFile
public FictiveFile(java.lang.String localPath,
java.lang.String remotePath,
AbstractRemoteFileSystemDriver driver)
FictiveFile
public FictiveFile(java.lang.String localPath,
java.lang.String remotePath,
long remoteLength,
boolean remoteDirectory,
boolean remoteExists,
long remoteTs)
getLocalPath
public java.lang.String getLocalPath()
getRemotePath
public java.lang.String getRemotePath()
length
public long length()
- Overrides:
length
in class java.io.File
isDirectory
public boolean isDirectory()
- Overrides:
isDirectory
in class java.io.File
isFile
public boolean isFile()
- Overrides:
isFile
in class java.io.File
exists
public boolean exists()
- Overrides:
exists
in class java.io.File
lastModified
public long lastModified()
- Overrides:
lastModified
in class java.io.File
init
public void init(long remoteLength,
boolean remoteDirectory,
boolean remoteExists,
long remoteTs)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.io.File