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

Unified Diff: pkg/analyzer_experimental/lib/options.dart

Issue 23054008: Remove the Path class from dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed first round of review comments Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/lib/options.dart
diff --git a/pkg/analyzer_experimental/lib/options.dart b/pkg/analyzer_experimental/lib/options.dart
index dd841f0a3c43f3f376871a119302bc4a87158cf6..25a496c68386e4131b8d447e9cf0d72a87f4a2af 100644
--- a/pkg/analyzer_experimental/lib/options.dart
+++ b/pkg/analyzer_experimental/lib/options.dart
@@ -5,6 +5,7 @@
library options;
import 'package:args/args.dart';
+import 'package:path/path.dart';
import 'dart:io';
@@ -153,8 +154,7 @@ class CommandLineOptions {
static String _getVersion() {
try {
- Path path = new Path(Platform.script);
- Path versionPath = path.directoryPath.append('..').append('version');
+ Path versionPath = join(dirname(Platform.script), '..', 'version');;
File versionFile = new File.fromPath(versionPath);
return versionFile.readAsStringSync().trim();
} catch (_) {

Powered by Google App Engine
This is Rietveld 408576698