| 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 #ifndef BIN_FILE_H_ | 5 #ifndef BIN_FILE_H_ |
| 6 #define BIN_FILE_H_ | 6 #define BIN_FILE_H_ |
| 7 | 7 |
| 8 #if defined(_WIN32) | 8 #if defined(_WIN32) |
| 9 typedef signed __int64 int64_t; | 9 typedef signed __int64 int64_t; |
| 10 typedef unsigned __int8 uint8_t; | 10 typedef unsigned __int8 uint8_t; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Create a file object for the specified stdio file descriptor | 115 // Create a file object for the specified stdio file descriptor |
| 116 // (stdin, stout or stderr). | 116 // (stdin, stout or stderr). |
| 117 static File* OpenStdio(int fd); | 117 static File* OpenStdio(int fd); |
| 118 | 118 |
| 119 static bool Exists(const char* name); | 119 static bool Exists(const char* name); |
| 120 static bool Create(const char* name); | 120 static bool Create(const char* name); |
| 121 static bool Delete(const char* name); | 121 static bool Delete(const char* name); |
| 122 static bool IsAbsolutePath(const char* pathname); | 122 static bool IsAbsolutePath(const char* pathname); |
| 123 static char* GetCanonicalPath(const char* name); | 123 static char* GetCanonicalPath(const char* name); |
| 124 static char* GetContainingDirectory(char* name); | 124 static char* GetContainingDirectory(char* name); |
| 125 static const char* GetWorkingDirectory(); |
| 125 static const char* PathSeparator(); | 126 static const char* PathSeparator(); |
| 126 static const char* StringEscapedPathSeparator(); | 127 static const char* StringEscapedPathSeparator(); |
| 127 static StdioHandleType GetStdioHandleType(int fd); | 128 static StdioHandleType GetStdioHandleType(int fd); |
| 128 | 129 |
| 129 static FileOpenMode DartModeToFileMode(DartFileOpenMode mode); | 130 static FileOpenMode DartModeToFileMode(DartFileOpenMode mode); |
| 130 | 131 |
| 131 static Dart_Port GetServicePort(); | 132 static Dart_Port GetServicePort(); |
| 132 | 133 |
| 133 private: | 134 private: |
| 134 File(const char* name, FileHandle* handle) : name_(name), handle_(handle) { } | 135 File(const char* name, FileHandle* handle) : name_(name), handle_(handle) { } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 145 File(const File&); | 146 File(const File&); |
| 146 void operator=(const File&); | 147 void operator=(const File&); |
| 147 | 148 |
| 148 static dart::Mutex mutex_; | 149 static dart::Mutex mutex_; |
| 149 static int service_ports_size_; | 150 static int service_ports_size_; |
| 150 static Dart_Port* service_ports_; | 151 static Dart_Port* service_ports_; |
| 151 static int service_ports_index_; | 152 static int service_ports_index_; |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 #endif // BIN_FILE_H_ | 155 #endif // BIN_FILE_H_ |
| OLD | NEW |