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

Unified Diff: pkg/path/lib/path.dart

Issue 20043004: Fix documentation of path.toUri(). (Closed) Base URL: https://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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/path/lib/path.dart
diff --git a/pkg/path/lib/path.dart b/pkg/path/lib/path.dart
index 1845e096199cc6cb99fc597734be4ede16158d43..cc0493ce76d116909675b6b88f67fedad8751401 100644
--- a/pkg/path/lib/path.dart
+++ b/pkg/path/lib/path.dart
@@ -289,9 +289,6 @@ String fromUri(Uri uri) => _builder.fromUri(uri);
/// For POSIX and Windows styles, this will return a `file:` URI. For the URL
/// style, this will just convert [path] to a [Uri].
///
-/// This will always convert relative paths to absolute ones before converting
-/// to a URI.
-///
/// // POSIX
/// path.toUri('/path/to/foo')
/// // -> Uri.parse('file:///path/to/foo')
@@ -303,6 +300,11 @@ String fromUri(Uri uri) => _builder.fromUri(uri);
/// // URL
/// path.toUri('http://dartlang.org/path/to/foo')
/// // -> Uri.parse('http://dartlang.org/path/to/foo')
+///
+/// If [path] is relative, a relative URI will be returned.
+///
+/// path.toUri('path/to/foo')
+/// // -> Uri.parse('path/to/foo')
Uri toUri(String path) => _builder.toUri(path);
/// Validates that there are no non-null arguments following a null one and
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698