comparison dwt/dwthelper/File.d @ 341:f403c83322c3 default tip

fix: thx torhu
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 20:58:32 +0100
parents 463d461e6e78
children
comparison
equal deleted inserted replaced
340:8a2a24a30ea9 341:f403c83322c3
6 import dwt.dwthelper.utils; 6 import dwt.dwthelper.utils;
7 7
8 static import tango.io.model.IFile; 8 static import tango.io.model.IFile;
9 static import tango.io.FilePath; 9 static import tango.io.FilePath;
10 static import tango.io.Path; 10 static import tango.io.Path;
11 static import tango.io.FileSystem; 11 version (TANGOSVN) {
12 static import tango.sys.Environment;
13 } else {
14 static import tango.io.FileSystem;
15 }
12 16
13 public class File { 17 public class File {
14 18
15 public static char separatorChar; 19 public static char separatorChar;
16 public static String separator; 20 public static String separator;
67 implMissing( __FILE__, __LINE__ ); 71 implMissing( __FILE__, __LINE__ );
68 return false; 72 return false;
69 } 73 }
70 74
71 public String getAbsolutePath(){ 75 public String getAbsolutePath(){
72 return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath ).toString; 76 version (TANGOSVN) {
77 if ( mFilePath.isAbsolute ) return mFilePath.toString;
78 else return mFilePath.absolute( tango.sys.Environment.Environment.cwd ).toString;
79 } else {
80 return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath).toString;
81 }
73 } 82 }
74 83
75 public dwt.dwthelper.File.File getAbsoluteFile(){ 84 public dwt.dwthelper.File.File getAbsoluteFile(){
76 return new File( getAbsolutePath() ); 85 return new File( getAbsolutePath() );
77 } 86 }