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

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

Issue 46163009: Return an absolute URI for Platform.script. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix apidoc, add test. Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/platform_impl.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 /** 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
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.
85 * the working directory of the VM when it was started. 85 *
86 * If the script argument on the command line is relative,
87 * it is resolved to an absolute URI before fetching the script, and
88 * this absolute URI is returned.
89 *
90 * URI resolution only does string manipulation on the script path, and this
91 * may be different from the file system's path resolution behavior. For
92 * example, a symbolic link immediately followed by '..' will not be
93 * looked up.
86 * 94 *
87 * If the executable environment does not support [script] an empty 95 * If the executable environment does not support [script] an empty
88 * URI is returned. 96 * [Uri] is returned.
89 */ 97 */
90 static Uri get script => _Platform.script; 98 static Uri get script => _Platform.script;
91 99
92 /** 100 /**
93 * Returns the flags passed to the executable used to run the script in this 101 * 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 102 * isolate. These are the command-line flags between the executable name
95 * and the script name. Each fetch of executableArguments returns a new 103 * and the script name. Each fetch of executableArguments returns a new
96 * List, containing the flags passed to the executable. 104 * List, containing the flags passed to the executable.
97 */ 105 */
98 static List<String> get executableArguments => _Platform.executableArguments; 106 static List<String> get executableArguments => _Platform.executableArguments;
99 107
100 /** 108 /**
101 * Returns the value of the --package-root flag passed to the executable 109 * 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 110 * used to run the script in this isolate. This is the directory in which
103 * Dart packages are looked up. 111 * Dart packages are looked up.
104 * 112 *
105 * If there is no --package-root flag, then the empty string is returned. 113 * If there is no --package-root flag, then the empty string is returned.
106 */ 114 */
107 static String get packageRoot => _Platform.packageRoot; 115 static String get packageRoot => _Platform.packageRoot;
108 116
109 /** 117 /**
110 * Returns the version of the current Dart runtime. 118 * Returns the version of the current Dart runtime.
111 */ 119 */
112 static String get version => _version; 120 static String get version => _version;
113 } 121 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698