| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 /// }); | 53 /// }); |
| 54 /// | 54 /// |
| 55 /// currentSchedule.onComplete.schedule(() { | 55 /// currentSchedule.onComplete.schedule(() { |
| 56 /// d.defaultRoot = null; | 56 /// d.defaultRoot = null; |
| 57 /// return tempDir.delete(recursive: true); | 57 /// return tempDir.delete(recursive: true); |
| 58 /// }); | 58 /// }); |
| 59 /// }); | 59 /// }); |
| 60 /// | 60 /// |
| 61 /// // ... | 61 /// // ... |
| 62 /// } | 62 /// } |
| 63 library 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:pathos/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'; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 /// A convenience method for creating a [PatternDescriptor] descriptor that | 122 /// A convenience method for creating a [PatternDescriptor] descriptor that |
| 123 /// constructs a [FileDescriptor] descriptor. | 123 /// constructs a [FileDescriptor] descriptor. |
| 124 PatternDescriptor filePattern(Pattern name, [String contents='']) => | 124 PatternDescriptor filePattern(Pattern name, [String contents='']) => |
| 125 pattern(name, (realName) => file(realName, contents)); | 125 pattern(name, (realName) => file(realName, contents)); |
| 126 | 126 |
| 127 /// A convenience method for creating a [PatternDescriptor] descriptor that | 127 /// A convenience method for creating a [PatternDescriptor] descriptor that |
| 128 /// constructs a [DirectoryDescriptor] descriptor. | 128 /// constructs a [DirectoryDescriptor] descriptor. |
| 129 PatternDescriptor dirPattern(Pattern name, [Iterable<Descriptor> contents]) => | 129 PatternDescriptor dirPattern(Pattern name, [Iterable<Descriptor> contents]) => |
| 130 pattern(name, (realName) => dir(realName, contents)); | 130 pattern(name, (realName) => dir(realName, contents)); |
| OLD | NEW |