java.lang .Object org.drftpd.remotefile .LinkedRemoteFile Inner Class :public static class NonExistingFile
Method Summary public LinkedRemoteFile addFile (RemoteFileInterface file) Updates lastModified() on this directory, use putFile() to avoid it.protected voidaddSize (long size) public voidaddSlave (RemoteSlave slave) public intcompareTo (Object o) public LinkedRemoteFile createDirectories (String path) public LinkedRemoteFile createDirectory (String fileName) public LinkedRemoteFile createDirectory (String owner, String group, String fileName) public voiddelete () Deletes a file or directory, RemoteSlave handles issues with slaves being
offline and queued deletes
Trying to lookupFile() or getFile() a deleted file throws
FileNotFoundException.public voiddeleteFromSlave (RemoteSlave rslave) public longdirSize () public booleanequals (Object obj) public static LinkedRemoteFile findLatestDir (ConnectionManager conn, LinkedRemoteFileInterface dir, User user, String searchstring) public List <LinkedRemoteFileInterface >getAllParentFiles () public Collection <RemoteSlave >getAvailableSlaves () public longgetCheckSum () public longgetCheckSumCached () Returns the cached checksum or 0 if no checksum was cached.public longgetCheckSumFromSlave () Returns 0 if the checksum cannot be read.public Collection <LinkedRemoteFileInterface >getDirectories () public LinkedRemoteFileInterface getFile (String fileName) Returns fileName contained in this directory.public Collection <RemoteFileInterface >getFiles () public Collection <LinkedRemoteFileInterface >getFiles2 () Returns a Collection of all the LinkedRemoteFile objects in this
directory, with all .isDeleted() files removed.public String getGroupname () public synchronized ID3Tag getID3v1Tag () public LinkedRemoteFile getLink () public String getLinkPath () public Map getMap () Returns the underlying Map for this directory.
It is dangerous to modify without knowing what you're doing.public String getName () public String getParent () public LinkedRemoteFile getParentFile () public LinkedRemoteFile getParentFileNull () public String getPath () public LinkedRemoteFile getRoot () public synchronized SFVFile getSFVFile () public List <RemoteSlave >getSlaves () returns slaves.public String getUsername () public longgetXferspeed () public longgetXfertime () public booleanhasFile (String filename) Returns true if this directory contains a file named filename, this is
case sensitive.public booleanhasOfflineSlaves () Returns true if this file or directory uses slaves that are currently
offline.public booleanhasSlave (RemoteSlave slave) public inthashCode () public booleanisAvailable () public booleanisDeleted () public booleanisDirectory () public booleanisFile () public booleanisLink () public booleanisValid () public longlastModified () public longlength () public LinkedRemoteFile lookupFile (String path) public LinkedRemoteFile lookupFile (String path, boolean followLinks) public String lookupMP3File () public NonExistingFilelookupNonExistingFile (String path) public NonExistingFilelookupNonExistingFile (String path, boolean followLinks) public String lookupPath (String path) Returns path for a non-existing file.public SFVFile lookupSFVFile () public LinkedRemoteFile putFile (RemoteFileInterface file) Use addFile() if you want lastModified to be updated.public voidremerge (CaseInsensitiveHashtable lightRemoteFiles, RemoteSlave rslave) public booleanremoveSlave (RemoteSlave slave) Shorthand for _slaves.remove() that checks if _slaves is empty and calls
.delete() if it is.public voidrenameTo (String toDirPath, String toName) public voidsetCheckSum (long checkSum) public voidsetGroup (String group) public voidsetLastModified (long lastModified) public voidsetLength (long length) public voidsetOwner (String owner) public voidsetXfertime (long xfertime) public String toString () public synchronized voidunmergeDir (RemoteSlave rslave) public voidunmergeFile (RemoteSlave rslave)
serialVersionUID final static long serialVersionUID (Code)
LinkedRemoteFile public LinkedRemoteFile(ConfigInterface ftpConfig)(Code) Creates an empty RemoteFile directory, usually used as an empty root
directory that {merge()} can be called on.
Used if no file database exists to start a tree from scratch.
LinkedRemoteFile public LinkedRemoteFile(RemoteFileInterface file, FtpConfig cfg) throws IOException (Code) Creates a root directory (parent == null) that FileRemoteFile or
JDOMRemoteFile is merged on.
Also called with null ConnectionManager from slave
addSize protected void addSize(long size)(Code)
delete public void delete()(Code) Deletes a file or directory, RemoteSlave handles issues with slaves being
offline and queued deletes
Trying to lookupFile() or getFile() a deleted file throws
FileNotFoundException.
dirSize public long dirSize()(Code)
getCheckSumCached public long getCheckSumCached()(Code) Returns the cached checksum or 0 if no checksum was cached.
Use {getCheckSum()} to automatically calculate checksum if no cached
checksum is available.
getCheckSumFromSlave public long getCheckSumFromSlave()(Code) Returns 0 if the checksum cannot be read.
getFiles2 public Collection <LinkedRemoteFileInterface > getFiles2()(Code) Returns a Collection of all the LinkedRemoteFile objects in this
directory, with all .isDeleted() files removed.
NOTE: Since DrFTPD 1.2, the collection returned can no longer be
directly modified.
Since this method overrides FileRemoteFile which is part of the classes
that keep 1.4 compatibility for the slaves it cannot use generics.
a Collection of all the LinkedRemoteFile objects in thisdirectory.
getMap public Map getMap()(Code) Returns the underlying Map for this directory.
It is dangerous to modify without knowing what you're doing. Dirsize
needs to be taken into account as well as sending approperiate commands
to the slaves.
the underlying Map for this directory.
getXferspeed public long getXferspeed()(Code)
getXfertime public long getXfertime()(Code) xfertime in milliseconds
hasFile public boolean hasFile(String filename)(Code) Returns true if this directory contains a file named filename, this is
case sensitive.
Parameters: filename - The name of the file true if this directory contains a file named filename, this iscase sensitive.
hasOfflineSlaves public boolean hasOfflineSlaves()(Code) Returns true if this file or directory uses slaves that are currently
offline.
true if this file or directory uses slaves that are currentlyoffline.
hashCode public int hashCode()(Code)
isAvailable public boolean isAvailable()(Code) Does file have online slaves?
Always true for directories
isDeleted public boolean isDeleted()(Code)
isDirectory public boolean isDirectory()(Code)
isFile public boolean isFile()(Code)
isLink public boolean isLink()(Code)
isValid public boolean isValid()(Code)
lastModified public long lastModified()(Code)
length public long length()(Code)
lookupNonExistingFile public NonExistingFile lookupNonExistingFile(String path)(Code)
lookupNonExistingFile public NonExistingFile lookupNonExistingFile(String path, boolean followLinks)(Code)
lookupPath public String lookupPath(String path)(Code) Returns path for a non-existing file. Performs path normalization and
returns an absolute path, follows links
removeSlave public boolean removeSlave(RemoteSlave slave)(Code) Shorthand for _slaves.remove() that checks if _slaves is empty and calls
.delete() if it is.
setCheckSum public void setCheckSum(long checkSum)(Code)
setLastModified public void setLastModified(long lastModified)(Code)
setLength public void setLength(long length)(Code)
setXfertime public void setXfertime(long xfertime)(Code)