12
|
1 /**
|
|
2 * Authors: Frank Benoit <keinfarbton@googlemail.com>
|
|
3 */
|
|
4 module dwt.dwthelper.File;
|
|
5
|
|
6 import dwt.dwthelper.utils;
|
|
7
|
|
8 static import tango.io.FileConst;
|
|
9 static import tango.io.FilePath;
|
|
10 static import tango.io.FileSystem;
|
|
11
|
|
12 public class File {
|
|
13
|
|
14 public static char separatorChar;
|
238
|
15 public static String separator;
|
12
|
16 public static char pathSeparatorChar;
|
238
|
17 public static String pathSeparator;
|
12
|
18
|
|
19 private tango.io.FilePath.FilePath mFilePath;
|
|
20
|
104
|
21 static this(){
|
|
22 separator = tango.io.FileConst.FileConst.PathSeparatorString;
|
|
23 separatorChar = tango.io.FileConst.FileConst.PathSeparatorChar;
|
|
24 pathSeparator = tango.io.FileConst.FileConst.SystemPathString;
|
|
25 pathSeparatorChar = tango.io.FileConst.FileConst.SystemPathChar;
|
|
26 }
|
|
27
|
238
|
28 public this ( String pathname ){
|
12
|
29 mFilePath = new tango.io.FilePath.FilePath( pathname );
|
|
30 }
|
|
31
|
238
|
32 public this ( String parent, String child ){
|
12
|
33 mFilePath = new tango.io.FilePath.FilePath( tango.io.FilePath.FilePath.join( parent, child ) );
|
|
34 }
|
|
35
|
238
|
36 public this ( dwt.dwthelper.File.File parent, String child ){
|
12
|
37 mFilePath = new tango.io.FilePath.FilePath( tango.io.FilePath.FilePath.join( parent.mFilePath.toString, child ) );
|
|
38 }
|
|
39
|
|
40 public int getPrefixLength(){
|
|
41 implMissing( __FILE__, __LINE__ );
|
|
42 return 0;
|
|
43 }
|
|
44
|
238
|
45 public String getName(){
|
12
|
46 implMissing( __FILE__, __LINE__ );
|
|
47 return null;
|
|
48 }
|
|
49
|
238
|
50 public String getParent(){
|
12
|
51 implMissing( __FILE__, __LINE__ );
|
|
52 return null;
|
|
53 }
|
|
54
|
|
55 public dwt.dwthelper.File.File getParentFile(){
|
|
56 implMissing( __FILE__, __LINE__ );
|
|
57 return null;
|
|
58 }
|
|
59
|
238
|
60 public String getPath(){
|
12
|
61 implMissing( __FILE__, __LINE__ );
|
|
62 return null;
|
|
63 }
|
|
64
|
|
65 public bool isAbsolute(){
|
|
66 implMissing( __FILE__, __LINE__ );
|
|
67 return false;
|
|
68 }
|
|
69
|
238
|
70 public String getAbsolutePath(){
|
12
|
71 return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath ).toString;
|
|
72 }
|
|
73
|
|
74 public dwt.dwthelper.File.File getAbsoluteFile(){
|
|
75 return new File( getAbsolutePath() );
|
|
76 }
|
|
77
|
238
|
78 public String getCanonicalPath(){
|
12
|
79 implMissing( __FILE__, __LINE__ );
|
|
80 return null;
|
|
81 }
|
|
82
|
|
83 public dwt.dwthelper.File.File getCanonicalFile(){
|
|
84 implMissing( __FILE__, __LINE__ );
|
|
85 return null;
|
|
86 }
|
|
87
|
|
88 public bool canRead(){
|
|
89 implMissing( __FILE__, __LINE__ );
|
|
90 return false;
|
|
91 }
|
|
92
|
|
93 public bool canWrite(){
|
|
94 return mFilePath.isWritable;
|
|
95 }
|
|
96
|
|
97 public bool exists(){
|
|
98 return mFilePath.exists;
|
|
99 }
|
|
100
|
|
101 public bool isDirectory(){
|
|
102 return mFilePath.isFolder;
|
|
103 }
|
|
104
|
|
105 public bool isFile(){
|
|
106 implMissing( __FILE__, __LINE__ );
|
|
107 return false;
|
|
108 }
|
|
109
|
|
110 public bool isHidden(){
|
|
111 implMissing( __FILE__, __LINE__ );
|
|
112 return false;
|
|
113 }
|
|
114
|
|
115 public long lastModified(){
|
|
116 implMissing( __FILE__, __LINE__ );
|
|
117 return 0L;
|
|
118 }
|
|
119
|
|
120 public long length(){
|
|
121 implMissing( __FILE__, __LINE__ );
|
|
122 return 0L;
|
|
123 }
|
|
124
|
|
125 public bool createNewFile(){
|
|
126 implMissing( __FILE__, __LINE__ );
|
|
127 return false;
|
|
128 }
|
|
129
|
|
130 public bool delete_KEYWORDESCAPE(){
|
|
131 implMissing( __FILE__, __LINE__ );
|
|
132 return false;
|
|
133 }
|
|
134
|
|
135 public void deleteOnExit(){
|
|
136 implMissing( __FILE__, __LINE__ );
|
|
137 }
|
|
138
|
238
|
139 public String[] list(){
|
12
|
140 implMissing( __FILE__, __LINE__ );
|
|
141 return null;
|
|
142 }
|
|
143
|
|
144 public dwt.dwthelper.File.File[] listFiles(){
|
|
145 implMissing( __FILE__, __LINE__ );
|
|
146 return null;
|
|
147 }
|
|
148
|
|
149 public bool mkdir(){
|
|
150 implMissing( __FILE__, __LINE__ );
|
|
151 return false;
|
|
152 }
|
|
153
|
|
154 public bool mkdirs(){
|
|
155 implMissing( __FILE__, __LINE__ );
|
|
156 return false;
|
|
157 }
|
|
158
|
|
159 public bool renameTo( dwt.dwthelper.File.File dest ){
|
|
160 implMissing( __FILE__, __LINE__ );
|
|
161 return false;
|
|
162 }
|
|
163
|
|
164 public bool setLastModified( long time ){
|
|
165 implMissing( __FILE__, __LINE__ );
|
|
166 return false;
|
|
167 }
|
|
168
|
|
169 public bool setReadOnly(){
|
|
170 implMissing( __FILE__, __LINE__ );
|
|
171 return false;
|
|
172 }
|
|
173
|
|
174 public static dwt.dwthelper.File.File[] listRoots(){
|
|
175 implMissing( __FILE__, __LINE__ );
|
|
176 return null;
|
|
177 }
|
|
178
|
238
|
179 public static dwt.dwthelper.File.File createTempFile( String prefix, String suffix, dwt.dwthelper.File.File directory ){
|
12
|
180 implMissing( __FILE__, __LINE__ );
|
|
181 return null;
|
|
182 }
|
|
183
|
238
|
184 public static dwt.dwthelper.File.File createTempFile( String prefix, String suffix ){
|
12
|
185 implMissing( __FILE__, __LINE__ );
|
|
186 return null;
|
|
187 }
|
|
188
|
|
189 public int compareTo( dwt.dwthelper.File.File pathname ){
|
|
190 implMissing( __FILE__, __LINE__ );
|
|
191 return 0;
|
|
192 }
|
|
193
|
238
|
194 public String toString(){
|
12
|
195 implMissing( __FILE__, __LINE__ );
|
|
196 return null;
|
|
197 }
|
|
198
|
|
199
|
|
200 }
|
|
201
|
|
202
|