| Index: pkg/analyzer_cli/test/utils.dart
|
| diff --git a/pkg/analyzer_cli/test/utils.dart b/pkg/analyzer_cli/test/utils.dart
|
| index 3e61ed24fe62dd05849429d147c80ec464fabb2f..cff248671acdd6d65a602a7fbe9ad45396b9db78 100644
|
| --- a/pkg/analyzer_cli/test/utils.dart
|
| +++ b/pkg/analyzer_cli/test/utils.dart
|
| @@ -40,6 +40,20 @@ String errorsForFile(String contents) {
|
| });
|
| }
|
|
|
| +/// Recursively copy the specified [src] directory (or file)
|
| +/// to the specified destination path.
|
| +Future<Null> recursiveCopy(FileSystemEntity src, String dstPath) async {
|
| + if (src is Directory) {
|
| + await (new Directory(dstPath)).create(recursive: true);
|
| + for (FileSystemEntity entity in src.listSync()) {
|
| + await recursiveCopy(
|
| + entity, pathos.join(dstPath, pathos.basename(entity.path)));
|
| + }
|
| + } else if (src is File) {
|
| + await src.copy(dstPath);
|
| + }
|
| +}
|
| +
|
| /// Creates a temporary directory and passes its path to [fn]. Once [fn]
|
| /// completes, the temporary directory and all its contents will be deleted.
|
| ///
|
| @@ -66,18 +80,4 @@ Future<dynamic> withTempDirAsync(Future<dynamic> fn(String path)) async {
|
| }
|
| }
|
|
|
| -/// Recursively copy the specified [src] directory (or file)
|
| -/// to the specified destination path.
|
| -Future<Null> recursiveCopy(FileSystemEntity src, String dstPath) async {
|
| - if (src is Directory) {
|
| - await (new Directory(dstPath)).create(recursive: true);
|
| - for (FileSystemEntity entity in src.listSync()) {
|
| - await recursiveCopy(
|
| - entity, pathos.join(dstPath, pathos.basename(entity.path)));
|
| - }
|
| - } else if (src is File) {
|
| - await src.copy(dstPath);
|
| - }
|
| -}
|
| -
|
| class _TestUtils {}
|
|
|