| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 kLengthRequest = 10, | 75 kLengthRequest = 10, |
| 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 }; | 87 }; |
| 87 | 88 |
| 88 ~File(); | 89 ~File(); |
| 89 | 90 |
| 90 // Read/Write attempt to transfer num_bytes to/from buffer. It returns | 91 // Read/Write attempt to transfer num_bytes to/from buffer. It returns |
| 91 // the number of bytes read/written. | 92 // the number of bytes read/written. |
| 92 int64_t Read(void* buffer, int64_t num_bytes); | 93 int64_t Read(void* buffer, int64_t num_bytes); |
| 93 int64_t Write(const void* buffer, int64_t num_bytes); | 94 int64_t Write(const void* buffer, int64_t num_bytes); |
| 94 | 95 |
| 95 // ReadFully and WriteFully do attempt to transfer num_bytes to/from | 96 // ReadFully and WriteFully do attempt to transfer num_bytes to/from |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 166 |
| 166 static NativeService file_service_; | 167 static NativeService file_service_; |
| 167 | 168 |
| 168 DISALLOW_COPY_AND_ASSIGN(File); | 169 DISALLOW_COPY_AND_ASSIGN(File); |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 } // namespace bin | 172 } // namespace bin |
| 172 } // namespace dart | 173 } // namespace dart |
| 173 | 174 |
| 174 #endif // BIN_FILE_H_ | 175 #endif // BIN_FILE_H_ |
| OLD | NEW |