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 /** | 7 /** |
8 * Information about the environment in which the current program is running. | 8 * Information about the environment in which the current program is running. |
9 * | 9 * |
10 * Platform provides information such as the operating system, | 10 * Platform provides information such as the operating system, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 * returned on Windows is therefore case-insensitive and will convert | 124 * returned on Windows is therefore case-insensitive and will convert |
125 * all keys to upper case. On other platforms the returned map is | 125 * all keys to upper case. On other platforms the returned map is |
126 * a standard case-sensitive map. | 126 * a standard case-sensitive map. |
127 */ | 127 */ |
128 static Map<String, String> get environment => _Platform.environment; | 128 static Map<String, String> get environment => _Platform.environment; |
129 | 129 |
130 /** | 130 /** |
131 * Returns the path of the executable used to run the script in this | 131 * Returns the path of the executable used to run the script in this |
132 * isolate. | 132 * isolate. |
133 * | 133 * |
134 * If supported by the platform the returned path will be absolute. | 134 * The path returned is the literal path used to run the script. This |
135 * path might be relative or just be a name from which the executable | |
136 * was found by searching the `PATH`. | |
137 * | |
138 * To get the absolute path to the resolved executable use | |
139 * [resolvedExecutable]. | |
135 * | 140 * |
136 * If the execution environment does not support [executable] an empty | 141 * If the execution environment does not support [executable] an empty |
137 * string is returned. | 142 * string is returned. |
138 */ | 143 */ |
139 static String get executable => _Platform.executable; | 144 static String get executable => _Platform.executable; |
140 | 145 |
141 /** | 146 /** |
147 * Returns the path of the executable used to run the script in this | |
148 * isolate after it has been resolved by the OS. | |
149 * | |
150 * This is the absolute path with all symlinks resolved to the | |
Lasse Reichstein Nielsen
2015/06/12 14:12:17
commas around "with all symlinks resolved".
Søren Gjesse
2015/06/15 07:28:15
Done.
| |
151 * executable used to running the script. | |
Lasse Reichstein Nielsen
2015/06/12 14:12:17
running -> run
Søren Gjesse
2015/06/15 07:28:15
Done.
| |
152 * | |
153 * If the execution environment does not support | |
154 * [resolvedExecutable] an empty string is returned. | |
Lasse Reichstein Nielsen
2015/06/12 14:12:17
comma before "an". Or rewrite as:
Returns an empty
Lasse Reichstein Nielsen
2015/06/12 14:13:31
And if throw, why give an option to not support it
Søren Gjesse
2015/06/15 07:28:15
See below.
Søren Gjesse
2015/06/15 07:28:15
Good point. Removed this option. All current platf
| |
155 */ | |
156 static String get resolvedExecutable => _Platform.resolvedExecutable; | |
157 | |
158 /** | |
142 * Returns the absolute URI of the script being run in this | 159 * Returns the absolute URI of the script being run in this |
143 * isolate. | 160 * isolate. |
144 * | 161 * |
145 * If the script argument on the command line is relative, | 162 * If the script argument on the command line is relative, |
146 * it is resolved to an absolute URI before fetching the script, and | 163 * it is resolved to an absolute URI before fetching the script, and |
147 * this absolute URI is returned. | 164 * this absolute URI is returned. |
148 * | 165 * |
149 * URI resolution only does string manipulation on the script path, and this | 166 * URI resolution only does string manipulation on the script path, and this |
150 * may be different from the file system's path resolution behavior. For | 167 * may be different from the file system's path resolution behavior. For |
151 * example, a symbolic link immediately followed by '..' will not be | 168 * example, a symbolic link immediately followed by '..' will not be |
(...skipping 24 matching lines...) Expand all Loading... | |
176 /** | 193 /** |
177 * Returns the version of the current Dart runtime. | 194 * Returns the version of the current Dart runtime. |
178 * | 195 * |
179 * The returned `String` is formatted as the | 196 * The returned `String` is formatted as the |
180 * [semver](http://semver.org) version string of the current dart | 197 * [semver](http://semver.org) version string of the current dart |
181 * runtime, possibly followed by whitespace and other version and | 198 * runtime, possibly followed by whitespace and other version and |
182 * build details. | 199 * build details. |
183 */ | 200 */ |
184 static String get version => _version; | 201 static String get version => _version; |
185 } | 202 } |
OLD | NEW |