comparison buildHelper.d @ 192:eb38fdcb3e62 default tip

updated to compile with dmd2.062
author korDen
date Sat, 02 Mar 2013 01:25:52 -0800
parents 80660782bffe
children
comparison
equal deleted inserted replaced
191:52188e7e3fb5 192:eb38fdcb3e62
93 /// makePathTo("C:\foo\bar\file.txt") will create "C:\foo\bar\" if it doesn't already exist. 93 /// makePathTo("C:\foo\bar\file.txt") will create "C:\foo\bar\" if it doesn't already exist.
94 /// makePathTo("C:\foo\bar\dir\") will create "C:\foo\bar\" if it doesn't already exist. 94 /// makePathTo("C:\foo\bar\dir\") will create "C:\foo\bar\" if it doesn't already exist.
95 void makePathTo(string file) 95 void makePathTo(string file)
96 { 96 {
97 file = normFilePath(file); 97 file = normFilePath(file);
98 auto dir = dirname(file); 98 auto dir = dirName(file);
99 makePath(dir); 99 makePath(dir);
100 } 100 }
101 101
102 /// Ensure trailing slash and OS-correct path separators 102 /// Ensure trailing slash and OS-correct path separators
103 string normDirPath(string str) 103 string normDirPath(string str)
104 { 104 {
105 str = normPathSep(str); 105 str = normPathSep(str);
106 if(str.length > 0 && str[$-1] != sep[0]) 106 if(str.length > 0 && str[$-1] != dirSeparator[0])
107 str ~= sep; 107 str ~= dirSeparator;
108 108
109 return str; 109 return str;
110 } 110 }
111 111
112 /// Ensure no trailing slash and OS-correct path separators 112 /// Ensure no trailing slash and OS-correct path separators
113 string normFilePath(string str) 113 string normFilePath(string str)
114 { 114 {
115 str = normPathSep(str); 115 str = normPathSep(str);
116 if(str.length > 0 && str[$-1] == sep[0]) 116 if(str.length > 0 && str[$-1] == dirSeparator[0])
117 str = str[0..$-1]; 117 str = str[0..$-1];
118 118
119 return str; 119 return str;
120 } 120 }
121 121