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