OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 class _Platform { | 7 class _Platform { |
8 external static int _numberOfProcessors(); | 8 external static int _numberOfProcessors(); |
9 external static String _pathSeparator(); | 9 external static String _pathSeparator(); |
10 external static String _operatingSystem(); | 10 external static String _operatingSystem(); |
(...skipping 10 matching lines...) Expand all Loading... |
21 * a non-empty name and a value separated by a '=' character. | 21 * a non-empty name and a value separated by a '=' character. |
22 * The name does not contain a '=' character, | 22 * The name does not contain a '=' character, |
23 * so the name is everything up to the first '=' character. | 23 * so the name is everything up to the first '=' character. |
24 * Values are everything after the first '=' charcacter. | 24 * Values are everything after the first '=' charcacter. |
25 * A value may contain further '=' characters, and it may be empty. | 25 * A value may contain further '=' characters, and it may be empty. |
26 * | 26 * |
27 * Returns an [OSError] if retrieving the environment fails. | 27 * Returns an [OSError] if retrieving the environment fails. |
28 */ | 28 */ |
29 external static _environment(); | 29 external static _environment(); |
30 external static List<String> _executableArguments(); | 30 external static List<String> _executableArguments(); |
31 external static String _packageRoot(); | |
32 external static String _version(); | 31 external static String _version(); |
33 | 32 |
34 static String executable = _executable(); | 33 static String executable = _executable(); |
35 static String resolvedExecutable = _resolvedExecutable(); | 34 static String resolvedExecutable = _resolvedExecutable(); |
36 static String packageRoot = _packageRoot(); | 35 external static Future<Uri> get packageRoot; |
| 36 external static Future<Map<String,Uri>> get packageMap; |
37 | 37 |
38 // Cache the OS environemnt. This can be an OSError instance if | 38 // Cache the OS environemnt. This can be an OSError instance if |
39 // retrieving the environment failed. | 39 // retrieving the environment failed. |
40 static var _environmentCache; | 40 static var _environmentCache; |
41 | 41 |
42 static int get numberOfProcessors => _numberOfProcessors(); | 42 static int get numberOfProcessors => _numberOfProcessors(); |
43 static String get pathSeparator => _pathSeparator(); | 43 static String get pathSeparator => _pathSeparator(); |
44 static String get operatingSystem => _operatingSystem(); | 44 static String get operatingSystem => _operatingSystem(); |
45 static Uri script; | 45 static Uri script; |
46 | 46 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 V remove(String key) => _map.remove(key.toUpperCase()); | 123 V remove(String key) => _map.remove(key.toUpperCase()); |
124 void clear() => _map.clear(); | 124 void clear() => _map.clear(); |
125 void forEach(void f(String key, V value)) => _map.forEach(f); | 125 void forEach(void f(String key, V value)) => _map.forEach(f); |
126 Iterable<String> get keys => _map.keys; | 126 Iterable<String> get keys => _map.keys; |
127 Iterable<V> get values => _map.values; | 127 Iterable<V> get values => _map.values; |
128 int get length => _map.length; | 128 int get length => _map.length; |
129 bool get isEmpty => _map.isEmpty; | 129 bool get isEmpty => _map.isEmpty; |
130 bool get isNotEmpty => _map.isNotEmpty; | 130 bool get isNotEmpty => _map.isNotEmpty; |
131 String toString() => _map.toString(); | 131 String toString() => _map.toString(); |
132 } | 132 } |
OLD | NEW |