| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bin/file.h" | 5 #include "bin/file.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <io.h> | 8 #include <io.h> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 int written = GetFullPathName(pathname, required_size, path, &file_part); | 182 int written = GetFullPathName(pathname, required_size, path, &file_part); |
| 183 ASSERT(written == (required_size - 1)); | 183 ASSERT(written == (required_size - 1)); |
| 184 ASSERT(file_part != NULL); | 184 ASSERT(file_part != NULL); |
| 185 ASSERT(file_part > path); | 185 ASSERT(file_part > path); |
| 186 ASSERT(file_part[-1] == '\\'); | 186 ASSERT(file_part[-1] == '\\'); |
| 187 file_part[-1] = '\0'; | 187 file_part[-1] = '\0'; |
| 188 return path; | 188 return path; |
| 189 } | 189 } |
| 190 | 190 |
| 191 | 191 |
| 192 const char* File::GetWorkingDirectory() { |
| 193 UNIMPLEMENTED(); |
| 194 return "."; |
| 195 } |
| 196 |
| 197 |
| 192 const char* File::PathSeparator() { | 198 const char* File::PathSeparator() { |
| 193 return "\\"; | 199 return "\\"; |
| 194 } | 200 } |
| 195 | 201 |
| 196 | 202 |
| 197 const char* File::StringEscapedPathSeparator() { | 203 const char* File::StringEscapedPathSeparator() { |
| 198 return "\\\\"; | 204 return "\\\\"; |
| 199 } | 205 } |
| 200 | 206 |
| 201 | 207 |
| 202 File::StdioHandleType File::GetStdioHandleType(int fd) { | 208 File::StdioHandleType File::GetStdioHandleType(int fd) { |
| 203 // Treat all stdio handles as pipes. The Windows event handler and | 209 // Treat all stdio handles as pipes. The Windows event handler and |
| 204 // socket code will handle the different handle types. | 210 // socket code will handle the different handle types. |
| 205 return kPipe; | 211 return kPipe; |
| 206 } | 212 } |
| OLD | NEW |