| 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.descriptor; | 5 library descriptor.descriptor; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import '../utils.dart'; | |
| 10 | |
| 11 /// The base class for various declarative descriptions of filesystem entries. | 9 /// The base class for various declarative descriptions of filesystem entries. |
| 12 /// All asynchronous operations on descriptors are [schedule]d unless otherwise | 10 /// All asynchronous operations on descriptors are [schedule]d unless otherwise |
| 13 /// noted. | 11 /// noted. |
| 14 abstract class Descriptor { | 12 abstract class Descriptor { |
| 15 /// The name of this entry. | 13 /// The name of this entry. |
| 16 final String name; | 14 final String name; |
| 17 | 15 |
| 18 Descriptor(this.name); | 16 Descriptor(this.name); |
| 19 | 17 |
| 20 /// Schedules the creation of the described entry within the [parent] | 18 /// Schedules the creation of the described entry within the [parent] |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 53 |
| 56 /// An interface for descriptors whose contents can be read. | 54 /// An interface for descriptors whose contents can be read. |
| 57 abstract class ReadableDescriptor implements Descriptor { | 55 abstract class ReadableDescriptor implements Descriptor { |
| 58 /// Returns the contents of [this] as a stream. This only works if [this] is a | 56 /// Returns the contents of [this] as a stream. This only works if [this] is a |
| 59 /// file entry. This operation is not [schedule]d. | 57 /// file entry. This operation is not [schedule]d. |
| 60 /// | 58 /// |
| 61 /// All errors in loading the file will be passed through the returned | 59 /// All errors in loading the file will be passed through the returned |
| 62 /// [Stream]. | 60 /// [Stream]. |
| 63 Stream<List<int>> read(); | 61 Stream<List<int>> read(); |
| 64 } | 62 } |
| OLD | NEW |