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

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

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