01: package com.coldcore.coloradoftp.filesystem;
02:
03: import java.util.Date;
04:
05: /**
06: * Listing file.
07: *
08: * This class is used by a file system to produce directory listings
09: * (in response to LIST and NLST commands for example).
10: *
11: *
12: * ColoradoFTP - The Open Source FTP Server (http://cftp.coldcore.com)
13: */
14: public interface ListingFile {
15:
16: /** Get owner name
17: * @return Name of the file owner
18: */
19: public String getOwner();
20:
21: /** Set owner name
22: * @param owner Name of the file owner
23: */
24: public void setOwner(String owner);
25:
26: /** Test if this file is a directory
27: * @return TRIE if it is a directory, FALSE otherwise
28: */
29: public boolean isDirectory();
30:
31: /** Set wether this is directory
32: * @param b TRUE for directories, FALSE for files
33: */
34: public void setDirectory(boolean b);
35:
36: /** Get 9-letter permissions string
37: * @return Permissions string
38: */
39: public String getPermissions();
40:
41: /** Set 9-letter permissions string
42: * @param permissions Permissions string
43: */
44: public void setPermissions(String permissions);
45:
46: /** Get facts (MLSx command)
47: * @return Facts string
48: */
49: public String getMlsxFacts();
50:
51: /** Set facts (MLSx command)
52: * @param facts Permissions string
53: */
54: public void setMlsxFacts(String facts);
55:
56: /** Get file size
57: * @return Size of the file in bytes
58: */
59: public long getSize();
60:
61: /** Set file size
62: * @param size Size of the file in bytes
63: */
64: public void setSize(long size);
65:
66: /** Get name of the file
67: * @return Non-absolute file name
68: */
69: public String getName();
70:
71: /** Set name of the file
72: * @param name Non-absolute file name
73: */
74: public void setName(String name);
75:
76: /** Get abfolute path of the file
77: * @return Absolute path name
78: */
79: public String getAbsolutePath();
80:
81: /** Set abfolute path of the file
82: * @param path Absolute path name
83: */
84: public void setAbsolutePath(String path);
85:
86: /** Get last modified date
87: * @return Last modified date
88: */
89: public Date getLastModified();
90:
91: /** Set last modified date
92: * @param date Last modified date
93: */
94: public void setLastModified(Date date);
95: }
|