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 patch class _File { | 5 patch class _File { |
6 /* patch */ static _exists(String path) native "File_Exists"; | 6 /* patch */ static _exists(String path) native "File_Exists"; |
7 /* patch */ static _create(String path) native "File_Create"; | 7 /* patch */ static _create(String path) native "File_Create"; |
8 /* patch */ static _createLink(String path, String target) | 8 /* patch */ static _createLink(String path, String target) |
9 native "File_CreateLink"; | 9 native "File_CreateLink"; |
10 /* patch */ static _linkTarget(String path) native "File_LinkTarget"; | 10 /* patch */ static _linkTarget(String path) native "File_LinkTarget"; |
(...skipping 20 matching lines...) Expand all Loading... |
31 native "File_ReadInto"; | 31 native "File_ReadInto"; |
32 /* patch */ static _writeByte(int id, int value) native "File_WriteByte"; | 32 /* patch */ static _writeByte(int id, int value) native "File_WriteByte"; |
33 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end) | 33 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end) |
34 native "File_WriteFrom"; | 34 native "File_WriteFrom"; |
35 /* patch */ static _position(int id) native "File_Position"; | 35 /* patch */ static _position(int id) native "File_Position"; |
36 /* patch */ static _setPosition(int id, int position) | 36 /* patch */ static _setPosition(int id, int position) |
37 native "File_SetPosition"; | 37 native "File_SetPosition"; |
38 /* patch */ static _truncate(int id, int length) native "File_Truncate"; | 38 /* patch */ static _truncate(int id, int length) native "File_Truncate"; |
39 /* patch */ static _length(int id) native "File_Length"; | 39 /* patch */ static _length(int id) native "File_Length"; |
40 /* patch */ static _flush(int id) native "File_Flush"; | 40 /* patch */ static _flush(int id) native "File_Flush"; |
| 41 /* patch */ static _lock(int id, int lock, int start, int end) |
| 42 native "File_Lock"; |
41 } | 43 } |
42 | 44 |
43 | 45 |
44 class _WatcherPath { | 46 class _WatcherPath { |
45 final int pathId; | 47 final int pathId; |
46 final String path; | 48 final String path; |
47 final int events; | 49 final int events; |
48 int count = 0; | 50 int count = 0; |
49 _WatcherPath(this.pathId, this.path, this.events); | 51 _WatcherPath(this.pathId, this.path, this.events); |
50 } | 52 } |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 void _pathWatchedEnd() { | 361 void _pathWatchedEnd() { |
360 _subscription.cancel(); | 362 _subscription.cancel(); |
361 _controller.close(); | 363 _controller.close(); |
362 } | 364 } |
363 } | 365 } |
364 | 366 |
365 | 367 |
366 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { | 368 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { |
367 return new Uint8List.view(source.buffer, offsetInBytes, length); | 369 return new Uint8List.view(source.buffer, offsetInBytes, length); |
368 } | 370 } |
OLD | NEW |