01: package snow.files;
02:
03: import java.io.File;
04:
05: /** A file stored with some infos. And a relative path.
06: * May also be instancied for files no more existing.
07: * Used in search / compare functions and browse in the JFilesTableModel
08: */
09: public class JFile {
10: public final File f;
11: public final String relName;
12: public final long lastModified;
13: public final long length;
14:
15: public JFile(File f, String relName) {
16: this .f = f;
17: this .relName = relName;
18: lastModified = f.lastModified();
19: length = f.length();
20: }
21:
22: public JFile(String relName) {
23: this .f = null;
24: this .relName = relName;
25: this .lastModified = -1;
26: this .length = -1;
27: }
28:
29: }
|