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

Unified Diff: tools/dom/docs/bin/docs.dart

Issue 19705015: Switch docs to path package (away from dart:io Path). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | tools/dom/docs/lib/docs.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/docs/bin/docs.dart
===================================================================
--- tools/dom/docs/bin/docs.dart (revision 25319)
+++ tools/dom/docs/bin/docs.dart (working copy)
@@ -10,10 +10,14 @@
import 'dart:io';
import 'dart:async';
+import 'package:path/path.dart' as path;
+
import '../lib/docs.dart';
-final Path json_path = scriptDir.append('../docs.json').canonicalize();
-final Path lib_path = scriptDir.append('../../../../sdk/').canonicalize();
+final String json_path =
+ path.normalize(path.join(scriptDir, '..', 'docs.json'));
+final String lib_path =
+ path.normalize(path.join(scriptDir, '..', '..', '..', '..', 'sdk'));
main() {
print('Converting HTML docs from $lib_path to $json_path.');
@@ -29,5 +33,4 @@
* Gets the full path to the directory containing the entrypoint of the current
* script.
*/
-Path get scriptDir =>
- new Path(new Options().script).directoryPath;
+String get scriptDir => path.dirname(new Options().script);
« no previous file with comments | « no previous file | tools/dom/docs/lib/docs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698