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

Unified Diff: sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart

Issue 13878002: Fix the dartdoc build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
index 89b1861fe2bea66c056c40ee608b9c38b5f34c4a..20e6bee19a3e5ff2a1f1ff1102ea613beef3e401 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
@@ -121,6 +121,16 @@ String fileUriToPath(Uri uri) {
return uri.path.replaceFirst("/", "").replaceAll("/", "\\");
}
+/** Converts a local path string to a `file:` [Uri]. */
+Uri pathToFileUri(String path) {
+ path = pathos.absolute(path);
+ if (Platform.operatingSystem != 'windows') {
+ return Uri.parse('file://$path');
+ } else {
+ return Uri.parse('file:///${path.replaceAll("\\", "/")}');
+ }
+}
+
/**
* If [map] contains an [Export] under [key], this merges that with [export].
* Otherwise, it sets [key] to [export].

Powered by Google App Engine
This is Rietveld 408576698