Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: sdk/lib/io/platform_impl.dart

Issue 1180623006: Revert change to Platform.excutable and add Platform.resolvedExecutable (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated dart2js io_patch.dart Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sdk/lib/io/platform.dart ('k') | tests/standalone/io/platform_executable_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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();
11 external static _localHostname(); 11 external static _localHostname();
12 external static _executable(); 12 external static _executable();
13 external static _resolvedExecutable();
13 /** 14 /**
14 * Retrieve the entries of the process environment. 15 * Retrieve the entries of the process environment.
15 * 16 *
16 * The result is an [Iterable] of strings, where each string represents 17 * The result is an [Iterable] of strings, where each string represents
17 * an environment entry. 18 * an environment entry.
18 * 19 *
19 * Environment entries should be strings containing 20 * Environment entries should be strings containing
20 * a non-empty name and a value separated by a '=' character. 21 * a non-empty name and a value separated by a '=' character.
21 * The name does not contain a '=' character, 22 * The name does not contain a '=' character,
22 * so the name is everything up to the first '=' character. 23 * so the name is everything up to the first '=' character.
23 * Values are everything after the first '=' charcacter. 24 * Values are everything after the first '=' charcacter.
24 * A value may contain further '=' characters, and it may be empty. 25 * A value may contain further '=' characters, and it may be empty.
25 * 26 *
26 * Returns an [OSError] if retrieving the environment fails. 27 * Returns an [OSError] if retrieving the environment fails.
27 */ 28 */
28 external static _environment(); 29 external static _environment();
29 external static List<String> _executableArguments(); 30 external static List<String> _executableArguments();
30 external static String _packageRoot(); 31 external static String _packageRoot();
31 external static String _version(); 32 external static String _version();
32 33
33 static String executable = _executable(); 34 static String executable = _executable();
35 static String resolvedExecutable = _resolvedExecutable();
34 static String packageRoot = _packageRoot(); 36 static String packageRoot = _packageRoot();
35 37
36 // Cache the OS environemnt. This can be an OSError instance if 38 // Cache the OS environemnt. This can be an OSError instance if
37 // retrieving the environment failed. 39 // retrieving the environment failed.
38 static var _environmentCache; 40 static var _environmentCache;
39 41
40 static int get numberOfProcessors => _numberOfProcessors(); 42 static int get numberOfProcessors => _numberOfProcessors();
41 static String get pathSeparator => _pathSeparator(); 43 static String get pathSeparator => _pathSeparator();
42 static String get operatingSystem => _operatingSystem(); 44 static String get operatingSystem => _operatingSystem();
43 static Uri script; 45 static Uri script;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 V remove(String key) => _map.remove(key.toUpperCase()); 123 V remove(String key) => _map.remove(key.toUpperCase());
122 void clear() => _map.clear(); 124 void clear() => _map.clear();
123 void forEach(void f(String key, V value)) => _map.forEach(f); 125 void forEach(void f(String key, V value)) => _map.forEach(f);
124 Iterable<String> get keys => _map.keys; 126 Iterable<String> get keys => _map.keys;
125 Iterable<V> get values => _map.values; 127 Iterable<V> get values => _map.values;
126 int get length => _map.length; 128 int get length => _map.length;
127 bool get isEmpty => _map.isEmpty; 129 bool get isEmpty => _map.isEmpty;
128 bool get isNotEmpty => _map.isNotEmpty; 130 bool get isNotEmpty => _map.isNotEmpty;
129 String toString() => _map.toString(); 131 String toString() => _map.toString();
130 } 132 }
OLDNEW
« no previous file with comments | « sdk/lib/io/platform.dart ('k') | tests/standalone/io/platform_executable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698