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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 read(int bytes) native "File_Read"; | 48 read(int bytes) native "File_Read"; |
49 readInto(List<int> buffer, int start, int end) native "File_ReadInto"; | 49 readInto(List<int> buffer, int start, int end) native "File_ReadInto"; |
50 writeByte(int value) native "File_WriteByte"; | 50 writeByte(int value) native "File_WriteByte"; |
51 writeFrom(List<int> buffer, int start, int end) native "File_WriteFrom"; | 51 writeFrom(List<int> buffer, int start, int end) native "File_WriteFrom"; |
52 position() native "File_Position"; | 52 position() native "File_Position"; |
53 setPosition(int position) native "File_SetPosition"; | 53 setPosition(int position) native "File_SetPosition"; |
54 truncate(int length) native "File_Truncate"; | 54 truncate(int length) native "File_Truncate"; |
55 length() native "File_Length"; | 55 length() native "File_Length"; |
56 flush() native "File_Flush"; | 56 flush() native "File_Flush"; |
57 lock(int lock, int start, int end) native "File_Lock"; | 57 lock(int lock, int start, int end) native "File_Lock"; |
58 setTranslation(int translation) native "File_SetTranslation"; | |
59 } | 58 } |
60 | 59 |
61 | 60 |
62 class _WatcherPath { | 61 class _WatcherPath { |
63 final int pathId; | 62 final int pathId; |
64 final String path; | 63 final String path; |
65 final int events; | 64 final int events; |
66 int count = 0; | 65 int count = 0; |
67 _WatcherPath(this.pathId, this.path, this.events); | 66 _WatcherPath(this.pathId, this.path, this.events); |
68 } | 67 } |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 void _pathWatchedEnd() { | 380 void _pathWatchedEnd() { |
382 _subscription.cancel(); | 381 _subscription.cancel(); |
383 _controller.close(); | 382 _controller.close(); |
384 } | 383 } |
385 } | 384 } |
386 | 385 |
387 | 386 |
388 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { | 387 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { |
389 return new Uint8List.view(source.buffer, offsetInBytes, length); | 388 return new Uint8List.view(source.buffer, offsetInBytes, length); |
390 } | 389 } |
OLD | NEW |