OLD | NEW |
1 // Copyright (c) 2011, 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" |
| 6 |
5 #include <fcntl.h> | 7 #include <fcntl.h> |
6 #include <io.h> | 8 #include <io.h> |
7 #include <stdio.h> | 9 #include <stdio.h> |
8 #include <string.h> | 10 #include <string.h> |
9 #include <sys/stat.h> | 11 #include <sys/stat.h> |
10 | 12 |
11 #include "bin/builtin.h" | 13 #include "bin/builtin.h" |
12 #include "bin/file.h" | |
13 | 14 |
14 class FileHandle { | 15 class FileHandle { |
15 public: | 16 public: |
16 explicit FileHandle(int fd) : fd_(fd) { } | 17 explicit FileHandle(int fd) : fd_(fd) { } |
17 ~FileHandle() { } | 18 ~FileHandle() { } |
18 int fd() const { return fd_; } | 19 int fd() const { return fd_; } |
19 void set_fd(int fd) { fd_ = fd; } | 20 void set_fd(int fd) { fd_ = fd; } |
20 | 21 |
21 private: | 22 private: |
22 int fd_; | 23 int fd_; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 164 |
164 | 165 |
165 const char* File::PathSeparator() { | 166 const char* File::PathSeparator() { |
166 return "\\"; | 167 return "\\"; |
167 } | 168 } |
168 | 169 |
169 | 170 |
170 const char* File::StringEscapedPathSeparator() { | 171 const char* File::StringEscapedPathSeparator() { |
171 return "\\\\"; | 172 return "\\\\"; |
172 } | 173 } |
OLD | NEW |