Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Side by Side Diff: runtime/bin/file_patch.dart

Issue 19263003: Add FileSystemWatcher class to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify watching by removing FileSystemWatcher and adding FileSystemEntity.watch. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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";
(...skipping 24 matching lines...) Expand all
35 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end) 35 /* patch */ static _writeFrom(int id, List<int> buffer, int start, int end)
36 native "File_WriteFrom"; 36 native "File_WriteFrom";
37 /* patch */ static _position(int id) native "File_Position"; 37 /* patch */ static _position(int id) native "File_Position";
38 /* patch */ static _setPosition(int id, int position) 38 /* patch */ static _setPosition(int id, int position)
39 native "File_SetPosition"; 39 native "File_SetPosition";
40 /* patch */ static _truncate(int id, int length) native "File_Truncate"; 40 /* patch */ static _truncate(int id, int length) native "File_Truncate";
41 /* patch */ static _length(int id) native "File_Length"; 41 /* patch */ static _length(int id) native "File_Length";
42 /* patch */ static _flush(int id) native "File_Flush"; 42 /* patch */ static _flush(int id) native "File_Flush";
43 } 43 }
44 44
45 patch class _FileSystemWatcher {
46 _watchPath(String path, int events, bool recursive)
47 native "FileSystemWatcher_WatchPath";
48 void _unwatchPath(int id) native "FileSystemWatcher_UnwatchPath";
49 int _getSocketId(int id) native "FileSystemWatcher_GetSocketId";
50 List _readEvents(int id)
51 native "FileSystemWatcher_ReadEvents";
52 }
53
45 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) { 54 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) {
46 return new Uint8List.view(source.buffer, offsetInBytes, length); 55 return new Uint8List.view(source.buffer, offsetInBytes, length);
47 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698