01: /*
02: * This file is part of DrFTPD, Distributed FTP Daemon.
03: *
04: * DrFTPD is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * DrFTPD is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with DrFTPD; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18: package org.drftpd.remotefile;
19:
20: import java.io.FileNotFoundException;
21: import java.util.Collection;
22: import java.util.List;
23:
24: import org.drftpd.master.RemoteSlave;
25:
26: /**
27: * @author mog
28: * @version $Id: RemoteFileInterface.java 874 2004-12-23 17:43:28Z mog $
29: */
30: public interface RemoteFileInterface extends LightRemoteFileInterface {
31:
32: /**
33: * Returns the cached checksum or 0 if no checksum was cached.
34: * <p>
35: * Use {getCheckSum()} to automatically calculate checksum if no cached checksum is available.
36: */
37: public long getCheckSumCached();
38:
39: /**
40: * Returns a Collection of RemoteFileInterface objects.
41: */
42: public Collection<RemoteFileInterface> getFiles();
43:
44: /**
45: * Get the group owner of the file as a String.
46: * <p>
47: * getUser().getGroupname() if the implementing class uses a User object.
48: * @return primary group of the owner of this file
49: */
50: public String getGroupname();
51:
52: /**
53: * Returns the target of the link.
54: * @return target of the link.
55: */
56: public String getLinkPath();
57:
58: public abstract String getParent() throws FileNotFoundException;
59:
60: public abstract String getPath();
61:
62: public Collection<RemoteSlave> getSlaves();
63:
64: /**
65: * Returns string representation of the owner of this file.
66: * <p>
67: * getUser().getUsername() if the implementing class uses a User object.
68: * @return username of the owner of this file.
69: */
70: public String getUsername();
71:
72: public long getXfertime();
73:
74: /**
75: * boolean flag whether this file is a 'link', it can be linked to another file.
76: * This is for the moment used for "ghost files".
77: */
78: public boolean isLink();
79: }
|