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

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

Issue 3006873002: [dart:io] Adds Platform.operatingSystemVersion (Closed)
Patch Set: Updated CHANGELOG Created 3 years, 3 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
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/io_patch.dart ('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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/io_patch.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698