| Index: lib/src/util/io.dart
|
| diff --git a/lib/src/util/io.dart b/lib/src/util/io.dart
|
| index 9a00ad642be035a69a0a350f4eebd6ecb4b48bc3..c14e32f56bc86eda13003b87f9b34482c18a9654 100644
|
| --- a/lib/src/util/io.dart
|
| +++ b/lib/src/util/io.dart
|
| @@ -10,12 +10,22 @@ import 'dart:mirrors';
|
|
|
| import 'package:path/path.dart' as p;
|
|
|
| +import '../backend/operating_system.dart';
|
| import '../runner/load_exception.dart';
|
|
|
| /// The root directory of the Dart SDK.
|
| final String sdkDir =
|
| p.dirname(p.dirname(Platform.executable));
|
|
|
| +/// Returns the current operating system.
|
| +final OperatingSystem currentOS = (() {
|
| + var name = Platform.operatingSystem;
|
| + var os = OperatingSystem.findByIoName(name);
|
| + if (os != null) return os;
|
| +
|
| + throw new UnsupportedError('Unsupported operating system "$name".');
|
| +})();
|
| +
|
| /// The path to the `lib` directory of the `unittest` package.
|
| String libDir({String packageRoot}) {
|
| var pathToIo = libraryPath(#unittest.util.io, packageRoot: packageRoot);
|
|
|