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 _FileUtils { | 5 patch class _FileUtils { |
6 /* patch */ static SendPort _newServicePort() native "File_NewServicePort"; | 6 /* patch */ static SendPort _newServicePort() native "File_NewServicePort"; |
7 } | 7 } |
8 | 8 |
9 patch class _File { | 9 patch class _File { |
10 /* patch */ static _exists(String path) native "File_Exists"; | 10 /* patch */ static _exists(String path) native "File_Exists"; |
11 /* patch */ static _create(String path) native "File_Create"; | 11 /* patch */ static _create(String path) native "File_Create"; |
12 /* patch */ static _createLink(String path, String target) | 12 /* patch */ static _createLink(String path, String target) |
13 native "File_CreateLink"; | 13 native "File_CreateLink"; |
14 /* patch */ static _linkTarget(String path) native "File_LinkTarget"; | 14 /* patch */ static _linkTarget(String path) native "File_LinkTarget"; |
15 /* patch */ static _delete(String path) native "File_Delete"; | 15 /* patch */ static _delete(String path) native "File_Delete"; |
16 /* patch */ static _deleteLink(String path) native "File_DeleteLink"; | 16 /* patch */ static _deleteLink(String path) native "File_DeleteLink"; |
17 /* patch */ static _directory(String path) native "File_Directory"; | 17 /* patch */ static _directory(String path) native "File_Directory"; |
18 /* patch */ static _lengthFromPath(String path) native "File_LengthFromPath"; | 18 /* patch */ static _lengthFromPath(String path) native "File_LengthFromPath"; |
19 /* patch */ static _lastModified(String path) native "File_LastModified"; | 19 /* patch */ static _lastModified(String path) native "File_LastModified"; |
20 /* patch */ static _open(String path, int mode) native "File_Open"; | 20 /* patch */ static _open(String path, int mode) native "File_Open"; |
21 /* patch */ static int _openStdio(int fd) native "File_OpenStdio"; | 21 /* patch */ static int _openStdio(int fd) native "File_OpenStdio"; |
22 /* patch */ static _fullPath(String path) native "File_FullPath"; | 22 /* patch */ static _fullPath(String path) native "File_FullPath"; |
23 } | 23 } |
24 | 24 |
25 patch class _RandomAccessFile { | 25 patch class _RandomAccessFile { |
26 /* patch */ static int _close(int id) native "File_Close"; | 26 /* patch */ static int _close(int id) native "File_Close"; |
27 /* patch */ static _readByte(int id) native "File_ReadByte"; | 27 /* patch */ static _readByte(int id) native "File_ReadByte"; |
28 /* patch */ static _read(int id, int bytes) native "File_Read"; | 28 /* patch */ static _read(int id, int bytes) native "File_Read"; |
29 /* patch */ static _readList(int id, List<int> buffer, int offset, int bytes) | 29 /* patch */ static _readInto(int id, List<int> buffer, int start, int end) |
30 native "File_ReadList"; | 30 native "File_ReadInto"; |
31 /* patch */ static _writeByte(int id, int value) native "File_WriteByte"; | 31 /* patch */ static _writeByte(int id, int value) native "File_WriteByte"; |
32 /* patch */ static _writeList(int id, List<int> buffer, int offset, int bytes) | 32 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end) |
33 native "File_WriteList"; | 33 native "File_WriteFrom"; |
34 /* patch */ static _position(int id) native "File_Position"; | 34 /* patch */ static _position(int id) native "File_Position"; |
35 /* patch */ static _setPosition(int id, int position) | 35 /* patch */ static _setPosition(int id, int position) |
36 native "File_SetPosition"; | 36 native "File_SetPosition"; |
37 /* patch */ static _truncate(int id, int length) native "File_Truncate"; | 37 /* patch */ static _truncate(int id, int length) native "File_Truncate"; |
38 /* patch */ static _length(int id) native "File_Length"; | 38 /* patch */ static _length(int id) native "File_Length"; |
39 /* patch */ static _flush(int id) native "File_Flush"; | 39 /* patch */ static _flush(int id) native "File_Flush"; |
40 } | 40 } |
41 | 41 |
42 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { | 42 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { |
43 return new Uint8List.view(source.buffer, offsetInBytes, length); | 43 return new Uint8List.view(source.buffer, offsetInBytes, length); |
44 } | 44 } |
OLD | NEW |