| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 kLengthFromPathRequest = 11, | 76 kLengthFromPathRequest = 11, |
| 77 kLastModifiedRequest = 12, | 77 kLastModifiedRequest = 12, |
| 78 kFlushRequest = 13, | 78 kFlushRequest = 13, |
| 79 kReadByteRequest = 14, | 79 kReadByteRequest = 14, |
| 80 kWriteByteRequest = 15, | 80 kWriteByteRequest = 15, |
| 81 kReadRequest = 16, | 81 kReadRequest = 16, |
| 82 kReadIntoRequest = 17, | 82 kReadIntoRequest = 17, |
| 83 kWriteFromRequest = 18, | 83 kWriteFromRequest = 18, |
| 84 kCreateLinkRequest = 19, | 84 kCreateLinkRequest = 19, |
| 85 kDeleteLinkRequest = 20, | 85 kDeleteLinkRequest = 20, |
| 86 kLinkTargetRequest = 21, | 86 kRenameLinkRequest = 21, |
| 87 kTypeRequest = 22, | 87 kLinkTargetRequest = 22, |
| 88 kIdenticalRequest = 23, | 88 kTypeRequest = 23, |
| 89 kStatRequest = 24 | 89 kIdenticalRequest = 24, |
| 90 kStatRequest = 25 |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 enum FileStat { | 93 enum FileStat { |
| 93 // These match the constants in FileStat in file_system_entity.dart. | 94 // These match the constants in FileStat in file_system_entity.dart. |
| 94 kType = 0, | 95 kType = 0, |
| 95 kCreatedTime = 1, | 96 kCreatedTime = 1, |
| 96 kModifiedTime = 2, | 97 kModifiedTime = 2, |
| 97 kAccessedTime = 3, | 98 kAccessedTime = 3, |
| 98 kMode = 4, | 99 kMode = 4, |
| 99 kSize = 5, | 100 kSize = 5, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Create a file object for the specified stdio file descriptor | 148 // Create a file object for the specified stdio file descriptor |
| 148 // (stdin, stout or stderr). | 149 // (stdin, stout or stderr). |
| 149 static File* OpenStdio(int fd); | 150 static File* OpenStdio(int fd); |
| 150 | 151 |
| 151 static bool Exists(const char* path); | 152 static bool Exists(const char* path); |
| 152 static bool Create(const char* path); | 153 static bool Create(const char* path); |
| 153 static bool CreateLink(const char* path, const char* target); | 154 static bool CreateLink(const char* path, const char* target); |
| 154 static bool Delete(const char* path); | 155 static bool Delete(const char* path); |
| 155 static bool DeleteLink(const char* path); | 156 static bool DeleteLink(const char* path); |
| 156 static bool Rename(const char* old_path, const char* new_path); | 157 static bool Rename(const char* old_path, const char* new_path); |
| 158 static bool RenameLink(const char* old_path, const char* new_path); |
| 157 static off_t LengthFromPath(const char* path); | 159 static off_t LengthFromPath(const char* path); |
| 158 static void Stat(const char* path, int64_t* data); | 160 static void Stat(const char* path, int64_t* data); |
| 159 static time_t LastModified(const char* path); | 161 static time_t LastModified(const char* path); |
| 160 static char* LinkTarget(const char* pathname); | 162 static char* LinkTarget(const char* pathname); |
| 161 static bool IsAbsolutePath(const char* path); | 163 static bool IsAbsolutePath(const char* path); |
| 162 static char* GetCanonicalPath(const char* path); | 164 static char* GetCanonicalPath(const char* path); |
| 163 static const char* PathSeparator(); | 165 static const char* PathSeparator(); |
| 164 static const char* StringEscapedPathSeparator(); | 166 static const char* StringEscapedPathSeparator(); |
| 165 static Type GetType(const char* path, bool follow_links); | 167 static Type GetType(const char* path, bool follow_links); |
| 166 static Identical AreIdentical(const char* file_1, const char* file_2); | 168 static Identical AreIdentical(const char* file_1, const char* file_2); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 181 | 183 |
| 182 static NativeService file_service_; | 184 static NativeService file_service_; |
| 183 | 185 |
| 184 DISALLOW_COPY_AND_ASSIGN(File); | 186 DISALLOW_COPY_AND_ASSIGN(File); |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 } // namespace bin | 189 } // namespace bin |
| 188 } // namespace dart | 190 } // namespace dart |
| 189 | 191 |
| 190 #endif // BIN_FILE_H_ | 192 #endif // BIN_FILE_H_ |
| OLD | NEW |