| 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 | 5 @patch |
| 6 class _File { | 6 class _File { |
| 7 @patch | 7 @patch |
| 8 static _exists(String path) native "File_Exists"; | 8 static _exists(String path) native "File_Exists"; |
| 9 @patch | 9 @patch |
| 10 static _create(String path) native "File_Create"; | 10 static _create(String path) native "File_Create"; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 read(int bytes) native "File_Read"; | 62 read(int bytes) native "File_Read"; |
| 63 readInto(List<int> buffer, int start, int end) native "File_ReadInto"; | 63 readInto(List<int> buffer, int start, int end) native "File_ReadInto"; |
| 64 writeByte(int value) native "File_WriteByte"; | 64 writeByte(int value) native "File_WriteByte"; |
| 65 writeFrom(List<int> buffer, int start, int end) native "File_WriteFrom"; | 65 writeFrom(List<int> buffer, int start, int end) native "File_WriteFrom"; |
| 66 position() native "File_Position"; | 66 position() native "File_Position"; |
| 67 setPosition(int position) native "File_SetPosition"; | 67 setPosition(int position) native "File_SetPosition"; |
| 68 truncate(int length) native "File_Truncate"; | 68 truncate(int length) native "File_Truncate"; |
| 69 length() native "File_Length"; | 69 length() native "File_Length"; |
| 70 flush() native "File_Flush"; | 70 flush() native "File_Flush"; |
| 71 lock(int lock, int start, int end) native "File_Lock"; | 71 lock(int lock, int start, int end) native "File_Lock"; |
| 72 setTranslation(int translation) native "File_SetTranslation"; | |
| 73 } | 72 } |
| 74 | 73 |
| 75 class _WatcherPath { | 74 class _WatcherPath { |
| 76 final int pathId; | 75 final int pathId; |
| 77 final String path; | 76 final String path; |
| 78 final int events; | 77 final int events; |
| 79 int count = 0; | 78 int count = 0; |
| 80 _WatcherPath(this.pathId, this.path, this.events); | 79 _WatcherPath(this.pathId, this.path, this.events); |
| 81 } | 80 } |
| 82 | 81 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 393 |
| 395 void _pathWatchedEnd() { | 394 void _pathWatchedEnd() { |
| 396 _subscription.cancel(); | 395 _subscription.cancel(); |
| 397 _controller.close(); | 396 _controller.close(); |
| 398 } | 397 } |
| 399 } | 398 } |
| 400 | 399 |
| 401 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { | 400 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { |
| 402 return new Uint8List.view(source.buffer, offsetInBytes, length); | 401 return new Uint8List.view(source.buffer, offsetInBytes, length); |
| 403 } | 402 } |
| OLD | NEW |