Chromium Code Reviews| Index: sdk/lib/io/file_system_entity.dart |
| diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart |
| index 60fe6658dd41fa3d30fc28528dfc7295dc8873dd..70ab58ef1f865a5a9686c72764400e85195bbd72 100644 |
| --- a/sdk/lib/io/file_system_entity.dart |
| +++ b/sdk/lib/io/file_system_entity.dart |
| @@ -658,6 +658,7 @@ class FileSystemEvent { |
| static const int _MODIFY_ATTRIBUTES = 1 << 4; |
| static const int _DELETE_SELF = 1 << 5; |
| + static const int _IS_DIR = 1 << 6; |
| /** |
| * The type of event. See [FileSystemEvent] for a list of events. |
| @@ -670,7 +671,12 @@ class FileSystemEvent { |
| */ |
| final String path; |
| - FileSystemEvent._(this.type, this.path); |
| + /** |
| + * Is `true` if the event target was a directory. |
| + */ |
| + final bool isDir; |
|
Bill Hesse
2013/10/28 16:30:13
I don't like isDir for the name of the property.
Anders Johnsen
2013/10/28 16:43:14
Done.
|
| + |
| + FileSystemEvent._(this.type, this.path, this.isDir); |
| } |
| @@ -678,8 +684,8 @@ class FileSystemEvent { |
| * File system event for newly created file system objects. |
| */ |
| class FileSystemCreateEvent extends FileSystemEvent { |
| - FileSystemCreateEvent._(path) |
| - : super._(FileSystemEvent.CREATE, path); |
| + FileSystemCreateEvent._(path, isDir) |
| + : super._(FileSystemEvent.CREATE, path, isDir); |
| String toString() => "FileSystemCreateEvent('$path')"; |
| } |
| @@ -695,8 +701,8 @@ class FileSystemModifyEvent extends FileSystemEvent { |
| */ |
| final bool contentChanged; |
| - FileSystemModifyEvent._(path, this.contentChanged) |
| - : super._(FileSystemEvent.MODIFY, path); |
| + FileSystemModifyEvent._(path, isDir, this.contentChanged) |
| + : super._(FileSystemEvent.MODIFY, path, isDir); |
| String toString() => |
| "FileSystemModifyEvent('$path', contentChanged=$contentChanged)"; |
| @@ -707,8 +713,8 @@ class FileSystemModifyEvent extends FileSystemEvent { |
| * File system event for deletion of file system objects. |
| */ |
| class FileSystemDeleteEvent extends FileSystemEvent { |
| - FileSystemDeleteEvent._(path) |
| - : super._(FileSystemEvent.DELETE, path); |
| + FileSystemDeleteEvent._(path, isDir) |
| + : super._(FileSystemEvent.DELETE, path, isDir); |
| String toString() => "FileSystemDeleteEvent('$path')"; |
| } |
| @@ -724,8 +730,8 @@ class FileSystemMoveEvent extends FileSystemEvent { |
| */ |
| final String destination; |
| - FileSystemMoveEvent._(path, this.destination) |
| - : super._(FileSystemEvent.MOVE, path); |
| + FileSystemMoveEvent._(path, isDir, this.destination) |
| + : super._(FileSystemEvent.MOVE, path, isDir); |
| String toString() { |
| var buffer = new StringBuffer(); |