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