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

Side by Side Diff: sdk/lib/io/file_impl.dart

Issue 19263003: Add FileSystemWatcher class to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix android socket. 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
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/file_system_entity.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.io; 5 part of dart.io;
6 6
7 // Read the file in blocks of size 64k. 7 // Read the file in blocks of size 64k.
8 const int _BLOCK_SIZE = 64 * 1024; 8 const int _BLOCK_SIZE = 64 * 1024;
9 9
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 const int _STAT_REQUEST = 25; 227 const int _STAT_REQUEST = 25;
228 228
229 // TODO(ager): The only reason for this class is that the patching 229 // TODO(ager): The only reason for this class is that the patching
230 // mechanism doesn't seem to like patching a private top level 230 // mechanism doesn't seem to like patching a private top level
231 // function. 231 // function.
232 class _FileUtils { 232 class _FileUtils {
233 external static SendPort _newServicePort(); 233 external static SendPort _newServicePort();
234 } 234 }
235 235
236 // Class for encapsulating the native implementation of files. 236 // Class for encapsulating the native implementation of files.
237 class _File implements File { 237 class _File extends FileSystemEntity implements File {
238 final String path; 238 final String path;
239 SendPort _fileService; 239 SendPort _fileService;
240 240
241 // Constructor for file. 241 // Constructor for file.
242 _File(String this.path) { 242 _File(String this.path) {
243 if (path is! String) { 243 if (path is! String) {
244 throw new ArgumentError('${Error.safeToString(path)} ' 244 throw new ArgumentError('${Error.safeToString(path)} '
245 'is not a String'); 245 'is not a String');
246 } 246 }
247 } 247 }
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 void _checkNotClosed() { 977 void _checkNotClosed() {
978 if (closed) { 978 if (closed) {
979 throw new FileException("File closed", path); 979 throw new FileException("File closed", path);
980 } 980 }
981 } 981 }
982 982
983 Future _closedException() { 983 Future _closedException() {
984 return new Future.error(new FileException("File closed", path)); 984 return new Future.error(new FileException("File closed", path));
985 } 985 }
986 } 986 }
OLDNEW
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/file_system_entity.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698