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

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

Issue 2791453002: Revert "[dart:io] Adds Platform.localeName" (Closed)
Patch Set: Created 3 years, 8 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 _localHostname = _Platform.localHostname; 72 static final _localHostname = _Platform.localHostname;
73 static final _version = _Platform.version; 73 static final _version = _Platform.version;
74 static final _localeName = _Platform.localeName;
75 74
76 /** 75 /**
77 * Get the number of processors of the machine. 76 * Get the number of processors of the machine.
78 */ 77 */
79 static int get numberOfProcessors => _numberOfProcessors; 78 static int get numberOfProcessors => _numberOfProcessors;
80 79
81 /** 80 /**
82 * Get the path separator used by the operating system to separate 81 * Get the path separator used by the operating system to separate
83 * components in file paths. 82 * components in file paths.
84 */ 83 */
85 static String get pathSeparator => _pathSeparator; 84 static String get pathSeparator => _pathSeparator;
86 85
87 /** 86 /**
88 * Get the name of the current locale.
89 */
90 static String get localeName => _localeName;
91
92 /**
93 * Get a string (`linux`, `macos`, `windows`, `android`, or `ios`) 87 * Get a string (`linux`, `macos`, `windows`, `android`, or `ios`)
94 * representing the operating system. 88 * representing the operating system.
95 */ 89 */
96 static String get operatingSystem => _operatingSystem; 90 static String get operatingSystem => _operatingSystem;
97 91
98 /** 92 /**
99 * Get the local hostname for the system. 93 * Get the local hostname for the system.
100 */ 94 */
101 static String get localHostname => _localHostname; 95 static String get localHostname => _localHostname;
102 96
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 /** 206 /**
213 * Returns the version of the current Dart runtime. 207 * Returns the version of the current Dart runtime.
214 * 208 *
215 * The returned `String` is formatted as the 209 * The returned `String` is formatted as the
216 * [semver](http://semver.org) version string of the current dart 210 * [semver](http://semver.org) version string of the current dart
217 * runtime, possibly followed by whitespace and other version and 211 * runtime, possibly followed by whitespace and other version and
218 * build details. 212 * build details.
219 */ 213 */
220 static String get version => _version; 214 static String get version => _version;
221 } 215 }
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