| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 */ | 77 */ |
| 78 static int get numberOfProcessors => _numberOfProcessors; | 78 static int get numberOfProcessors => _numberOfProcessors; |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * Get the path separator used by the operating system to separate | 81 * Get the path separator used by the operating system to separate |
| 82 * components in file paths. | 82 * components in file paths. |
| 83 */ | 83 */ |
| 84 static String get pathSeparator => _pathSeparator; | 84 static String get pathSeparator => _pathSeparator; |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * Get a string (`linux`, `macos`, `windows` or `android`) | 87 * Get a string (`linux`, `macos`, `windows`, `android`, or `ios`) |
| 88 * representing the operating system. | 88 * representing the operating system. |
| 89 */ | 89 */ |
| 90 static String get operatingSystem => _operatingSystem; | 90 static String get operatingSystem => _operatingSystem; |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * Get the local hostname for the system. | 93 * Get the local hostname for the system. |
| 94 */ | 94 */ |
| 95 static String get localHostname => _localHostname; | 95 static String get localHostname => _localHostname; |
| 96 | 96 |
| 97 /** | 97 /** |
| (...skipping 10 matching lines...) Expand all Loading... |
| 108 * Returns true if the operating system is Windows. | 108 * Returns true if the operating system is Windows. |
| 109 */ | 109 */ |
| 110 static final bool isWindows = (_operatingSystem == "windows"); | 110 static final bool isWindows = (_operatingSystem == "windows"); |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * Returns true if the operating system is Android. | 113 * Returns true if the operating system is Android. |
| 114 */ | 114 */ |
| 115 static final bool isAndroid = (_operatingSystem == "android"); | 115 static final bool isAndroid = (_operatingSystem == "android"); |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * Returns true if the operating system is iOS. |
| 119 */ |
| 120 static final bool isiOS = (_operatingSystem == "ios"); |
| 121 |
| 122 /** |
| 118 * Get the environment for this process. | 123 * Get the environment for this process. |
| 119 * | 124 * |
| 120 * The returned environment is an unmodifiable map which content is | 125 * The returned environment is an unmodifiable map which content is |
| 121 * retrieved from the operating system on its first use. | 126 * retrieved from the operating system on its first use. |
| 122 * | 127 * |
| 123 * Environment variables on Windows are case-insensitive. The map | 128 * Environment variables on Windows are case-insensitive. The map |
| 124 * returned on Windows is therefore case-insensitive and will convert | 129 * returned on Windows is therefore case-insensitive and will convert |
| 125 * all keys to upper case. On other platforms the returned map is | 130 * all keys to upper case. On other platforms the returned map is |
| 126 * a standard case-sensitive map. | 131 * a standard case-sensitive map. |
| 127 */ | 132 */ |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 /** | 192 /** |
| 188 * Returns the version of the current Dart runtime. | 193 * Returns the version of the current Dart runtime. |
| 189 * | 194 * |
| 190 * The returned `String` is formatted as the | 195 * The returned `String` is formatted as the |
| 191 * [semver](http://semver.org) version string of the current dart | 196 * [semver](http://semver.org) version string of the current dart |
| 192 * runtime, possibly followed by whitespace and other version and | 197 * runtime, possibly followed by whitespace and other version and |
| 193 * build details. | 198 * build details. |
| 194 */ | 199 */ |
| 195 static String get version => _version; | 200 static String get version => _version; |
| 196 } | 201 } |
| OLD | NEW |