1 package com.loribel.commons.abstraction;
2
3 /***
4 * Interface representing a File
5 *
6 * @author Grégory Borelli
7 * @version 2003/10/21 - 13:41:57 - gen 7.12
8 */
9 public interface GB_FileInterface
10 {
11
12 /***
13 * Returns the name of the file or directory denoted by this abstract
14 * pathname.
15 *
16 * @return String
17 */
18 String getName();
19
20 /***
21 * Converts this pathname into a pathname string.
22 *
23 * @return String
24 */
25 String getPath();
26
27 /***
28 * Converts this pathname into a relative pathname string.
29 *
30 * @return String
31 */
32 String getRelativePath();
33
34 /***
35 * Tests whether the application can read the file denoted by this
36 * pathname.
37 *
38 * @return boolean
39 */
40 boolean canRead();
41
42 /***
43 * Tests whether the application can modify to the file denoted by this
44 * pathname.
45 *
46 * @return boolean
47 */
48 boolean canWrite();
49
50 /***
51 * Tests whether the file denoted by this pathname is a
52 * directory.
53 *
54 * @return boolean
55 */
56 boolean isDirectory();
57
58 /***
59 * Tests whether the file named by this pathname is a hidden
60 * file.
61 *
62 * @return boolean
63 */
64 boolean isHidden();
65
66 /***
67 * Returns the time that the file denoted by this pathname was
68 * last modified.
69 *
70 * @return long
71 */
72 long lastModified();
73
74 /***
75 * Returns the length of the file denoted by this pathname.
76 * The return value is unspecified if this pathname denotes a directory.
77 *
78 * @return long
79 */
80 long length();
81
82 /***
83 * Returns an array of strings naming the files and directories in the
84 * directory denoted by this pathname.
85 *
86 * @return String[]
87 */
88 String[] list();
89
90 /***
91 * Return a child.
92 *
93 * @param a_childName String -
94 *
95 * @return GB_FileInterface
96 */
97 GB_FileInterface getChild(
98 String a_childName);
99
100 }