| Index: pkg/analyzer/lib/file_system/physical_file_system.dart
|
| diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
|
| index d9497df78ae7cdbbc3da69bd8202cdd4ddca8af9..000a5679c66eff17d6f412683a92e8764b14a101 100644
|
| --- a/pkg/analyzer/lib/file_system/physical_file_system.dart
|
| +++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
|
| @@ -39,15 +39,27 @@ class PhysicalResourceProvider implements ResourceProvider {
|
|
|
| @override
|
| Context get pathContext => io.Platform.isWindows ? windows : posix;
|
| -
|
| +
|
| + /**
|
| + * Return a [File] that corresponds to the given [path].
|
| + *
|
| + * A file may or may not exist at this location.
|
| + */
|
| + File getFile(String path) => new _PhysicalFile(new io.File(path));
|
| +
|
| + /**
|
| + * Return a [Folder] that corresponds to the given [path].
|
| + *
|
| + * A folder may or may not exist at this location.
|
| + */
|
| + Folder getFolder(String path) => new _PhysicalFolder(new io.Directory(path));
|
| +
|
| @override
|
| Resource getResource(String path) {
|
| if (io.FileSystemEntity.isDirectorySync(path)) {
|
| - io.Directory directory = new io.Directory(path);
|
| - return new _PhysicalFolder(directory);
|
| + return getFolder(path);
|
| } else {
|
| - io.File file = new io.File(path);
|
| - return new _PhysicalFile(file);
|
| + return getFile(path);
|
| }
|
| }
|
|
|
|
|