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

Side by Side Diff: pkg/watcher/lib/src/constructable_file_system_event.dart

Issue 66163002: Wrap Directory.watch on Mac OS for the watcher package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month 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 | « pkg/pkg.status ('k') | pkg/watcher/lib/src/directory_watcher.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library watcher.constructable_file_system_event;
6
7 import 'dart:io';
8
9 abstract class _ConstructableFileSystemEvent implements FileSystemEvent {
10 final bool isDirectory;
11 final String path;
12 final int type;
13
14 _ConstructableFileSystemEvent(this.path, this.isDirectory);
15 }
16
17 class ConstructableFileSystemCreateEvent extends _ConstructableFileSystemEvent
18 implements FileSystemCreateEvent {
19 final type = FileSystemEvent.CREATE;
20
21 ConstructableFileSystemCreateEvent(String path, bool isDirectory)
22 : super(path, isDirectory);
23
24 String toString() => "FileSystemCreateEvent('$path')";
25 }
26
27 class ConstructableFileSystemDeleteEvent extends _ConstructableFileSystemEvent
28 implements FileSystemDeleteEvent {
29 final type = FileSystemEvent.DELETE;
30
31 ConstructableFileSystemDeleteEvent(String path, bool isDirectory)
32 : super(path, isDirectory);
33
34 String toString() => "FileSystemDeleteEvent('$path')";
35 }
36
37 class ConstructableFileSystemModifyEvent extends _ConstructableFileSystemEvent
38 implements FileSystemModifyEvent {
39 final bool contentChanged;
40 final type = FileSystemEvent.MODIFY;
41
42 ConstructableFileSystemModifyEvent(String path, bool isDirectory,
43 this.contentChanged)
44 : super(path, isDirectory);
45
46 String toString() =>
47 "FileSystemModifyEvent('$path', contentChanged=$contentChanged)";
48 }
49
50 class ConstructableFileSystemMoveEvent extends _ConstructableFileSystemEvent
51 implements FileSystemMoveEvent {
52 final String destination;
53 final type = FileSystemEvent.MOVE;
54
55 ConstructableFileSystemMoveEvent(String path, bool isDirectory,
56 this.destination)
57 : super(path, isDirectory);
58
59 String toString() => "FileSystemMoveEvent('$path', '$destination')";
60 }
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | pkg/watcher/lib/src/directory_watcher.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698