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 * The [Platform] class exposes details of the machine and operating | 8 * The [Platform] class exposes details of the machine and operating |
9 * system. | 9 * system. |
10 */ | 10 */ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 /** | 73 /** |
74 * Returns the path of the executable used to run the script in this | 74 * Returns the path of the executable used to run the script in this |
75 * isolate. | 75 * isolate. |
76 * | 76 * |
77 * If the execution environment does not support [executable] an empty | 77 * If the execution environment does not support [executable] an empty |
78 * string is returned. | 78 * string is returned. |
79 */ | 79 */ |
80 static String get executable => _Platform.executable; | 80 static String get executable => _Platform.executable; |
81 | 81 |
82 /** | 82 /** |
83 * Returns the URI of the script being run in this | 83 * Returns the absolute URI of the script being run in this |
84 * isolate. If the URI is relative it is relative to the file URI of | 84 * isolate. If the script argument on the command line is relative, |
Anders Johnsen
2013/11/01 10:13:51
Newline*2 before `If`.
Bill Hesse
2013/11/01 12:49:46
Done.
| |
85 * the working directory of the VM when it was started. | 85 * it is resolved to an absolute URI before fetching the script, and |
86 * this absolute URI is returned. | |
87 * | |
88 * This implies that a path including "link/.." in the script name | |
Søren Gjesse
2013/11/01 10:17:28
Instead of trying to examplify here maybe just say
Bill Hesse
2013/11/01 12:49:46
Done. I think the specific case is worth includin
| |
89 * is resolved by dropping the link component, which may be different | |
90 * from the file system's path resolution behavior. | |
86 * | 91 * |
87 * If the executable environment does not support [script] an empty | 92 * If the executable environment does not support [script] an empty |
88 * URI is returned. | 93 * URI is returned. |
89 */ | 94 */ |
90 static Uri get script => _Platform.script; | 95 static Uri get script => _Platform.script; |
91 | 96 |
92 /** | 97 /** |
93 * Returns the flags passed to the executable used to run the script in this | 98 * Returns the flags passed to the executable used to run the script in this |
94 * isolate. These are the command-line flags between the executable name | 99 * isolate. These are the command-line flags between the executable name |
95 * and the script name. Each fetch of executableArguments returns a new | 100 * and the script name. Each fetch of executableArguments returns a new |
96 * List, containing the flags passed to the executable. | 101 * List, containing the flags passed to the executable. |
97 */ | 102 */ |
98 static List<String> get executableArguments => _Platform.executableArguments; | 103 static List<String> get executableArguments => _Platform.executableArguments; |
99 | 104 |
100 /** | 105 /** |
101 * Returns the value of the --package-root flag passed to the executable | 106 * Returns the value of the --package-root flag passed to the executable |
102 * used to run the script in this isolate. This is the directory in which | 107 * used to run the script in this isolate. This is the directory in which |
103 * Dart packages are looked up. | 108 * Dart packages are looked up. |
104 * | 109 * |
105 * If there is no --package-root flag, then the empty string is returned. | 110 * If there is no --package-root flag, then the empty string is returned. |
106 */ | 111 */ |
107 static String get packageRoot => _Platform.packageRoot; | 112 static String get packageRoot => _Platform.packageRoot; |
108 | 113 |
109 /** | 114 /** |
110 * Returns the version of the current Dart runtime. | 115 * Returns the version of the current Dart runtime. |
111 */ | 116 */ |
112 static String get version => _version; | 117 static String get version => _version; |
113 } | 118 } |
OLD | NEW |