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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 final int pathId; | 43 final int pathId; |
44 final String path; | 44 final String path; |
45 final int events; | 45 final int events; |
46 int count = 0; | 46 int count = 0; |
47 _WatcherPath(this.pathId, this.path, this.events); | 47 _WatcherPath(this.pathId, this.path, this.events); |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 patch class _FileSystemWatcher { | 51 patch class _FileSystemWatcher { |
52 static int _id; | 52 static int _id; |
53 static final Map<int, _FileSystemWatcherPath> _idMap = {}; | 53 static final Map<int, _WatcherPath> _idMap = {}; |
54 | 54 |
55 final String _path; | 55 final String _path; |
56 final int _events; | 56 final int _events; |
57 final bool _recursive; | 57 final bool _recursive; |
58 | 58 |
59 _WatcherPath _watcherPath; | 59 _WatcherPath _watcherPath; |
60 | 60 |
61 StreamController _broadcastController; | 61 StreamController _broadcastController; |
62 | 62 |
63 /* patch */ static Stream<FileSystemEvent> watch( | 63 /* patch */ static Stream<FileSystemEvent> watch( |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 void _pathWatchedEnd() { | 350 void _pathWatchedEnd() { |
351 _subscription.cancel(); | 351 _subscription.cancel(); |
352 _controller.close(); | 352 _controller.close(); |
353 } | 353 } |
354 } | 354 } |
355 | 355 |
356 | 356 |
357 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { | 357 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { |
358 return new Uint8List.view(source.buffer, offsetInBytes, length); | 358 return new Uint8List.view(source.buffer, offsetInBytes, length); |
359 } | 359 } |
OLD | NEW |