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

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

Issue 423843002: Compute absolute script path at isolate startup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/main.cc ('k') | 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 * 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * provides additional task-oriented code samples that show how to use 65 * provides additional task-oriented code samples that show how to use
66 * various API from the [dart:io] library. 66 * various API from the [dart:io] library.
67 */ 67 */
68 class Platform { 68 class Platform {
69 static final _numberOfProcessors = _Platform.numberOfProcessors; 69 static final _numberOfProcessors = _Platform.numberOfProcessors;
70 static final _pathSeparator = _Platform.pathSeparator; 70 static final _pathSeparator = _Platform.pathSeparator;
71 static final _operatingSystem = _Platform.operatingSystem; 71 static final _operatingSystem = _Platform.operatingSystem;
72 static final _localHostname = _Platform.localHostname; 72 static final _localHostname = _Platform.localHostname;
73 static final _version = _Platform.version; 73 static final _version = _Platform.version;
74 74
75 // This script singleton is written to by the embedder if applicable.
76 static String _nativeScript = '';
77
78 /** 75 /**
79 * Get the number of processors of the machine. 76 * Get the number of processors of the machine.
80 */ 77 */
81 static int get numberOfProcessors => _numberOfProcessors; 78 static int get numberOfProcessors => _numberOfProcessors;
82 79
83 /** 80 /**
84 * Get the path separator used by the operating system to separate 81 * Get the path separator used by the operating system to separate
85 * components in file paths. 82 * components in file paths.
86 */ 83 */
87 static String get pathSeparator => _pathSeparator; 84 static String get pathSeparator => _pathSeparator;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 * 169 *
173 * If there is no --package-root flag, then the empty string is returned. 170 * If there is no --package-root flag, then the empty string is returned.
174 */ 171 */
175 static String get packageRoot => _Platform.packageRoot; 172 static String get packageRoot => _Platform.packageRoot;
176 173
177 /** 174 /**
178 * Returns the version of the current Dart runtime. 175 * Returns the version of the current Dart runtime.
179 */ 176 */
180 static String get version => _version; 177 static String get version => _version;
181 } 178 }
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698