| Index: sdk/lib/io/platform.dart
|
| diff --git a/sdk/lib/io/platform.dart b/sdk/lib/io/platform.dart
|
| index 156238a2a0df14a722d41a83df73acaaa7d85d88..bdb56b856d9d90c70dc13d89b6df548b96762640 100644
|
| --- a/sdk/lib/io/platform.dart
|
| +++ b/sdk/lib/io/platform.dart
|
| @@ -9,27 +9,52 @@ part of dart.io;
|
| * system.
|
| */
|
| class Platform {
|
| + static final _numberOfProcessors = _Platform.numberOfProcessors;
|
| + static final _pathSeparator = _Platform.pathSeparator;
|
| + static final _operatingSystem = _Platform.operatingSystem;
|
| + static final _localHostname = _Platform.localHostname;
|
| +
|
| /**
|
| * Get the number of processors of the machine.
|
| */
|
| - static int get numberOfProcessors => _Platform.numberOfProcessors;
|
| + static int get numberOfProcessors => _numberOfProcessors;
|
|
|
| /**
|
| * Get the path separator used by the operating system to separate
|
| * components in file paths.
|
| */
|
| - static String get pathSeparator => _Platform.pathSeparator;
|
| + static String get pathSeparator => _pathSeparator;
|
|
|
| /**
|
| - * Get a string ('macos', 'windows', 'linux') representing the
|
| - * operating system.
|
| + * Get a string (`linux`, `macos`, `windows` or `android`)
|
| + * representing the operating system.
|
| */
|
| - static String get operatingSystem => _Platform.operatingSystem;
|
| + static String get operatingSystem => _operatingSystem;
|
|
|
| /**
|
| * Get the local hostname for the system.
|
| */
|
| - static String get localHostname => _Platform.localHostname;
|
| + static String get localHostname => _localHostname;
|
| +
|
| + /**
|
| + * Returns true if the operating system is Linux.
|
| + */
|
| + static bool get isLinux => _operatingSystem == "linux";
|
| +
|
| + /**
|
| + * Returns true if the operating system is Mac OS.
|
| + */
|
| + static bool get isMacOS => _operatingSystem == "macos";
|
| +
|
| + /**
|
| + * Returns true if the operating system is Windows.
|
| + */
|
| + static bool get isWindows => _operatingSystem == "windows";
|
| +
|
| + /**
|
| + * Returns true if the operating system is Android.
|
| + */
|
| + static bool get isAndroid => _operatingSystem == "android";
|
|
|
| /**
|
| * Get the environment for this process.
|
|
|