| Index: sdk/lib/io/platform_impl.dart
|
| diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart
|
| index 6380e0d7c92f622495d3c9ca2149db2baafdfda9..addee0b6af2d92d96896266622f16bf055d66c27 100644
|
| --- a/sdk/lib/io/platform_impl.dart
|
| +++ b/sdk/lib/io/platform_impl.dart
|
| @@ -21,7 +21,7 @@ class _Platform {
|
| * a non-empty name and a value separated by a '=' character.
|
| * The name does not contain a '=' character,
|
| * so the name is everything up to the first '=' character.
|
| - * Values are everything after the first '=' charcacter.
|
| + * Values are everything after the first '=' character.
|
| * A value may contain further '=' characters, and it may be empty.
|
| *
|
| * Returns an [OSError] if retrieving the environment fails.
|
| @@ -29,13 +29,28 @@ class _Platform {
|
| external static _environment();
|
| external static List<String> _executableArguments();
|
| external static String _packageRoot();
|
| + external static _packageResolution();
|
| external static String _version();
|
|
|
| static String executable = _executable();
|
| static String resolvedExecutable = _resolvedExecutable();
|
| static String packageRoot = _packageRoot();
|
| + static var _resolution = () {
|
| + throw new UnimplementedError("TODO(iposva)");
|
| + } ();
|
|
|
| - // Cache the OS environemnt. This can be an OSError instance if
|
| + static Uri get packageRootUri {
|
| + if (_resolution is Uri) return _resolution;
|
| + return null;
|
| + }
|
| +
|
| + static Map<String, Uri> get packageMap {
|
| + if (_resolution is Map) return _resolution;
|
| + if (_resolution == null) return const <String, Uri>{};
|
| + return null;
|
| + }
|
| +
|
| + // Cache the OS environment. This can be an OSError instance if
|
| // retrieving the environment failed.
|
| static var _environmentCache;
|
|
|
|
|