comparison dwt/dwthelper/File.d @ 0:5406a8f6526d

Add initial files
author John Reimer <terminal.node@gmail.com
date Sun, 20 Jan 2008 21:50:55 -0800
parents
children ab60f3309436
comparison
equal deleted inserted replaced
-1:000000000000 0:5406a8f6526d
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 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
28 public this ( char[] pathname ){
29 mFilePath = new tango.io.FilePath.FilePath( pathname );
30 }
31
32 public this ( char[] parent, char[] child ){
33 mFilePath = new tango.io.FilePath.FilePath( tango.io.FilePath.FilePath.join( parent, child ) );
34 }
35
36 public this ( dwt.dwthelper.File.File parent, char[] child ){
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
45 public char[] getName(){
46 implMissing( __FILE__, __LINE__ );
47 return null;
48 }
49
50 public char[] getParent(){
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
60 public char[] getPath(){
61 implMissing( __FILE__, __LINE__ );
62 return null;
63 }
64
65 public bool isAbsolute(){
66 implMissing( __FILE__, __LINE__ );
67 return false;
68 }
69
70 public char[] getAbsolutePath(){
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
78 public char[] getCanonicalPath(){
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
139 public char[][] list(){
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
179 public static dwt.dwthelper.File.File createTempFile( char[] prefix, char[] suffix, dwt.dwthelper.File.File directory ){
180 implMissing( __FILE__, __LINE__ );
181 return null;
182 }
183
184 public static dwt.dwthelper.File.File createTempFile( char[] prefix, char[] suffix ){
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
194 public char[] toString(){
195 implMissing( __FILE__, __LINE__ );
196 return null;
197 }
198
199
200 }
201
202