OLD | NEW |
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 library descriptor.entry; | 5 library descriptor.entry; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
| 9 import '../utils.dart'; |
9 import 'utils.dart'; | 10 import 'utils.dart'; |
10 | 11 |
11 /// The base class for various declarative descriptions of filesystem entries. | 12 /// The base class for various declarative descriptions of filesystem entries. |
12 /// All asynchronous operations on descriptors are [schedule]d unless otherwise | 13 /// All asynchronous operations on descriptors are [schedule]d unless otherwise |
13 /// noted. | 14 /// noted. |
14 abstract class Entry { | 15 abstract class Entry { |
15 /// The name of this entry. For most operations, this must be a [String]; | 16 /// The name of this entry. For most operations, this must be a [String]; |
16 /// however, if the entry will only be used for validation, it may be a | 17 /// however, if the entry will only be used for validation, it may be a |
17 /// non-[String] [Pattern]. In this case, there must be only one entry | 18 /// non-[String] [Pattern]. In this case, there must be only one entry |
18 /// matching it in the physical filesystem for validation to succeed. | 19 /// matching it in the physical filesystem for validation to succeed. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 58 } |
58 | 59 |
59 /// Returns a human-readable description of [name], for error reporting. For | 60 /// Returns a human-readable description of [name], for error reporting. For |
60 /// string names, this will just be the name in quotes; for regular | 61 /// string names, this will just be the name in quotes; for regular |
61 /// expressions, it will use JavaScript-style `/.../` notation. | 62 /// expressions, it will use JavaScript-style `/.../` notation. |
62 String get nameDescription => describePattern(name); | 63 String get nameDescription => describePattern(name); |
63 | 64 |
64 /// Returns a detailed tree-style description of [this]. | 65 /// Returns a detailed tree-style description of [this]. |
65 String describe(); | 66 String describe(); |
66 } | 67 } |
OLD | NEW |