| 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 /// A library for declaratively describing a filesystem structure, usually for | 5 /// A library for declaratively describing a filesystem structure, usually for |
| 6 /// the purpose of creating or validating it as part of a scheduled test. | 6 /// the purpose of creating or validating it as part of a scheduled test. |
| 7 /// | 7 /// |
| 8 /// You can use [dir] and [file] to define a filesystem structure. Then, you can | 8 /// You can use [dir] and [file] to define a filesystem structure. Then, you can |
| 9 /// call [Descriptor.create] to schedule a task that will create that structure | 9 /// call [Descriptor.create] to schedule a task that will create that structure |
| 10 /// on the physical filesystem, or [Descriptor.validate] to schedule an | 10 /// on the physical filesystem, or [Descriptor.validate] to schedule an |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 /// return tempDir.delete(recursive: true); | 57 /// return tempDir.delete(recursive: true); |
| 58 /// }); | 58 /// }); |
| 59 /// }); | 59 /// }); |
| 60 /// | 60 /// |
| 61 /// // ... | 61 /// // ... |
| 62 /// } | 62 /// } |
| 63 library scheduled_test.descriptor; | 63 library scheduled_test.descriptor; |
| 64 | 64 |
| 65 import 'dart:async'; | 65 import 'dart:async'; |
| 66 | 66 |
| 67 import 'package:pathos/path.dart' as path; | 67 import 'package:path/path.dart' as path; |
| 68 | 68 |
| 69 import 'scheduled_test.dart'; | 69 import 'scheduled_test.dart'; |
| 70 import 'src/descriptor/async_descriptor.dart'; | 70 import 'src/descriptor/async_descriptor.dart'; |
| 71 import 'src/descriptor/descriptor.dart'; | 71 import 'src/descriptor/descriptor.dart'; |
| 72 import 'src/descriptor/directory_descriptor.dart'; | 72 import 'src/descriptor/directory_descriptor.dart'; |
| 73 import 'src/descriptor/file_descriptor.dart'; | 73 import 'src/descriptor/file_descriptor.dart'; |
| 74 import 'src/descriptor/nothing_descriptor.dart'; | 74 import 'src/descriptor/nothing_descriptor.dart'; |
| 75 import 'src/descriptor/pattern_descriptor.dart'; | 75 import 'src/descriptor/pattern_descriptor.dart'; |
| 76 | 76 |
| 77 export 'src/descriptor/async_descriptor.dart'; | 77 export 'src/descriptor/async_descriptor.dart'; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 /// A convenience method for creating a [PatternDescriptor] descriptor that | 134 /// A convenience method for creating a [PatternDescriptor] descriptor that |
| 135 /// constructs a [FileDescriptor] descriptor. | 135 /// constructs a [FileDescriptor] descriptor. |
| 136 PatternDescriptor filePattern(Pattern name, [String contents='']) => | 136 PatternDescriptor filePattern(Pattern name, [String contents='']) => |
| 137 pattern(name, (realName) => file(realName, contents)); | 137 pattern(name, (realName) => file(realName, contents)); |
| 138 | 138 |
| 139 /// A convenience method for creating a [PatternDescriptor] descriptor that | 139 /// A convenience method for creating a [PatternDescriptor] descriptor that |
| 140 /// constructs a [DirectoryDescriptor] descriptor. | 140 /// constructs a [DirectoryDescriptor] descriptor. |
| 141 PatternDescriptor dirPattern(Pattern name, [Iterable<Descriptor> contents]) => | 141 PatternDescriptor dirPattern(Pattern name, [Iterable<Descriptor> contents]) => |
| 142 pattern(name, (realName) => dir(realName, contents)); | 142 pattern(name, (realName) => dir(realName, contents)); |
| OLD | NEW |