| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 * ## Other resources | 62 * ## Other resources |
| 63 * | 63 * |
| 64 * [Dart by Example](https://www.dartlang.org/dart-by-example/#dart-io-and-comma
nd-line-apps) | 64 * [Dart by Example](https://www.dartlang.org/dart-by-example/#dart-io-and-comma
nd-line-apps) |
| 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 _operatingSystemVersion = _Platform.operatingSystemVersion; |
| 72 static final _localHostname = _Platform.localHostname; | 73 static final _localHostname = _Platform.localHostname; |
| 73 static final _version = _Platform.version; | 74 static final _version = _Platform.version; |
| 74 static final _localeName = _Platform.localeName; | 75 static final _localeName = _Platform.localeName; |
| 75 | 76 |
| 76 /** | 77 /** |
| 77 * The number of individual execution units of the machine. | 78 * The number of individual execution units of the machine. |
| 78 */ | 79 */ |
| 79 static int get numberOfProcessors => _numberOfProcessors; | 80 static int get numberOfProcessors => _numberOfProcessors; |
| 80 | 81 |
| 81 /** | 82 /** |
| 82 * The path separator used by the operating system to separate | 83 * The path separator used by the operating system to separate |
| 83 * components in file paths. | 84 * components in file paths. |
| 84 */ | 85 */ |
| 85 static String get pathSeparator => _pathSeparator; | 86 static String get pathSeparator => _pathSeparator; |
| 86 | 87 |
| 87 /** | 88 /** |
| 88 * Get the name of the current locale. | 89 * Get the name of the current locale. |
| 89 */ | 90 */ |
| 90 static String get localeName => _localeName; | 91 static String get localeName => _localeName; |
| 91 | 92 |
| 92 /** | 93 /** |
| 93 * A string representing the operating system or platform. | 94 * A string representing the operating system or platform. |
| 94 */ | 95 */ |
| 95 static String get operatingSystem => _operatingSystem; | 96 static String get operatingSystem => _operatingSystem; |
| 96 | 97 |
| 97 /** | 98 /** |
| 99 * A string representing the version of the operating system or platform. |
| 100 */ |
| 101 static String get operatingSystemVersion => _operatingSystemVersion; |
| 102 |
| 103 /** |
| 98 * The local hostname for the system. | 104 * The local hostname for the system. |
| 99 */ | 105 */ |
| 100 static String get localHostname => _localHostname; | 106 static String get localHostname => _localHostname; |
| 101 | 107 |
| 102 /** | 108 /** |
| 103 * Whether the operating system is a version of | 109 * Whether the operating system is a version of |
| 104 * [Linux](https://en.wikipedia.org/wiki/Linux). | 110 * [Linux](https://en.wikipedia.org/wiki/Linux). |
| 105 * | 111 * |
| 106 * This value is `false` if the operating system is a specialized | 112 * This value is `false` if the operating system is a specialized |
| 107 * version of Linux that identifies itself by a different name, | 113 * version of Linux that identifies itself by a different name, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 /** | 227 /** |
| 222 * The version of the current Dart runtime. | 228 * The version of the current Dart runtime. |
| 223 * | 229 * |
| 224 * The value is a [semantic versioning](http://semver.org) | 230 * The value is a [semantic versioning](http://semver.org) |
| 225 * string representing the version of the current Dart runtime, | 231 * string representing the version of the current Dart runtime, |
| 226 * possibly followed by whitespace and other version and | 232 * possibly followed by whitespace and other version and |
| 227 * build details. | 233 * build details. |
| 228 */ | 234 */ |
| 229 static String get version => _version; | 235 static String get version => _version; |
| 230 } | 236 } |
| OLD | NEW |