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

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

Issue 88063002: Don't report file-system move events on Mac OS, and use no-defer to avoid past events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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) 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 class FileSystemEntityType { 7 class FileSystemEntityType {
8 static const FILE = const FileSystemEntityType._internal(0); 8 static const FILE = const FileSystemEntityType._internal(0);
9 static const DIRECTORY = const FileSystemEntityType._internal(1); 9 static const DIRECTORY = const FileSystemEntityType._internal(1);
10 static const LINK = const FileSystemEntityType._internal(2); 10 static const LINK = const FileSystemEntityType._internal(2);
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 * file-system notifications, thus behavior depends on the platform. 346 * file-system notifications, thus behavior depends on the platform.
347 * 347 *
348 * * `Windows`: Uses `ReadDirectoryChangesW`. The implementation only 348 * * `Windows`: Uses `ReadDirectoryChangesW`. The implementation only
349 * supports watching directories. Recursive watching is supported. 349 * supports watching directories. Recursive watching is supported.
350 * * `Linux`: Uses `inotify`. The implementation supports watching both 350 * * `Linux`: Uses `inotify`. The implementation supports watching both
351 * files and directories. Recursive watching is not supported. 351 * files and directories. Recursive watching is not supported.
352 * Note: When watching files directly, delete events might not happen 352 * Note: When watching files directly, delete events might not happen
353 * as expected. 353 * as expected.
354 * * `Mac OS`: Uses `FSEvents`. The implementation supports watching both 354 * * `Mac OS`: Uses `FSEvents`. The implementation supports watching both
355 * files and directories. Recursive watching is supported. 355 * files and directories. Recursive watching is supported.
356 * Note: events happened slightly before calling [watch], may be part of
357 * the returned stream, on Mac OS.
358 * 356 *
359 * The system will start listening for events once the returned [Stream] is 357 * The system will start listening for events once the returned [Stream] is
360 * being listened to, not when the call to [watch] is issued. 358 * being listened to, not when the call to [watch] is issued.
361 * 359 *
362 * The returned value is an endless broadcast [Stream], that only stops when 360 * The returned value is an endless broadcast [Stream], that only stops when
363 * one of the following happends: 361 * one of the following happends:
364 * 362 *
365 * * The [Stream] is canceled, e.g. by calling `cancel` on the 363 * * The [Stream] is canceled, e.g. by calling `cancel` on the
366 * [StreamSubscription]. 364 * [StreamSubscription].
367 * * The [FileSystemEntity] being watches, is deleted. 365 * * The [FileSystemEntity] being watches, is deleted.
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 } 740 }
743 } 741 }
744 742
745 743
746 abstract class _FileSystemWatcher { 744 abstract class _FileSystemWatcher {
747 external factory _FileSystemWatcher(String path, int events, bool recursive); 745 external factory _FileSystemWatcher(String path, int events, bool recursive);
748 external static bool get isSupported; 746 external static bool get isSupported;
749 747
750 Stream<FileSystemEvent> get stream; 748 Stream<FileSystemEvent> get stream;
751 } 749 }
OLDNEW
« no previous file with comments | « runtime/bin/file_system_watcher_macos.cc ('k') | tests/standalone/io/file_system_watcher_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698