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

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

Issue 43773004: dart:platform | Remove isWindows, isLinux, isAndroid, isMacOS from dart:platform. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment about removing dart:io Platform 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 | « sdk/lib/_internal/lib/platform_patch.dart ('k') | tests/lib/lib.status » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 5 /**
6 * Runtime information about the current platform. 6 * Runtime information about the current platform.
7 */ 7 */
8 library dart.platform; 8 library dart.platform;
9 9
10 /** 10 /**
11 * The number of processors of the platform. 11 * The number of processors of the platform.
12 * 12 *
13 * Returns null if no information is available. 13 * Returns null if no information is available.
14 * 14 *
15 * Supported on the standalone Dart executable. 15 * Supported on the standalone Dart executable.
16 */ 16 */
17 external int get numberOfProcessors; 17 external int get numberOfProcessors;
18 18
19 /** 19 /**
20 * The path separator used on the platform to separate 20 * The path separator used on the platform to separate
21 * components in file paths. 21 * components in file paths.
22 *
23 * Returns null if the path separator is unknown or not valid.
24 *
25 * Supported on the standalone Dart executable and on dart2js.
22 */ 26 */
23 external String get pathSeparator; 27 external String get pathSeparator;
24 28
25 /** 29 /**
26 * A string (`linux`, `macos`, `windows` or `android`) 30 * A string (`linux`, `macos`, `windows` or `android`)
27 * representing the operating system. 31 * representing the operating system.
28 * 32 *
29 * Returns null if the operating system could not be determined. 33 * Returns null if the operating system could not be determined.
30 */ 34 */
31 external String get operatingSystem; 35 external String get operatingSystem;
(...skipping 10 matching lines...) Expand all
42 /** 46 /**
43 * The version of the current Dart runtime. 47 * The version of the current Dart runtime.
44 * 48 *
45 * Returns null if not running a Dart runtime. 49 * Returns null if not running a Dart runtime.
46 * 50 *
47 * Supported on the standalone Dart executable. 51 * Supported on the standalone Dart executable.
48 */ 52 */
49 external String get version; 53 external String get version;
50 54
51 /** 55 /**
52 * True if the operating system is Linux.
53 */
54 // TODO(6997): Replace with bool get isLinux => operatingSystem == 'linux'
55 // when issue with patched top-level functions is fixed.
56 external bool get isLinux;
57
58 /**
59 * True if the operating system is Mac OS.
60 */
61 external bool get isMacOS;
62
63 /**
64 * True if the operating system is Windows.
65 */
66 external bool get isWindows;
67
68 /**
69 * True if the operating system is Android.
70 */
71 external bool get isAndroid;
72
73 /**
74 * The environment for this instance of the platform. 56 * The environment for this instance of the platform.
75 * 57 *
76 * If environment variables are not supported on this platform, or not 58 * If environment variables are not supported on this platform, or not
77 * available, null is returned. 59 * available, null is returned.
78 * 60 *
79 * Environment variables on Windows are case-insensitive. The map 61 * Environment variables on Windows are case-insensitive. The map
80 * returned on Windows is therefore case-insensitive and converts 62 * returned on Windows is therefore case-insensitive and converts
81 * all keys and key arguments to its methods to upper case. 63 * all keys and key arguments to its methods to upper case.
82 * On other platforms the returned map is 64 * On other platforms the returned map is
83 * a standard case-sensitive map. 65 * a standard case-sensitive map.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 * 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
126 * Dart packages are looked up. 108 * Dart packages are looked up.
127 * 109 *
128 * 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.
129 * 111 *
130 * Returns null if the information is not available on this platform. 112 * Returns null if the information is not available on this platform.
131 * 113 *
132 * Supported on the standalone Dart executable. 114 * Supported on the standalone Dart executable.
133 */ 115 */
134 external String get packageRoot; 116 external String get packageRoot;
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/platform_patch.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698