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

Unified Diff: sdk/lib/io/directory_impl.dart

Issue 1089183004: Add Uri.directory constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 5 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
« no previous file with comments | « sdk/lib/core/uri.dart ('k') | tests/corelib/uri_file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/directory_impl.dart
diff --git a/sdk/lib/io/directory_impl.dart b/sdk/lib/io/directory_impl.dart
index 80d68be46caf9d528a08cad677e58354e3024382..620437c0e288d246ed29004d4de0429fe43a71fb 100644
--- a/sdk/lib/io/directory_impl.dart
+++ b/sdk/lib/io/directory_impl.dart
@@ -44,11 +44,7 @@ class _Directory extends FileSystemEntity implements Directory {
}
Uri get uri {
- String path = this.path;
- if (!path.endsWith("/")) {
- path = path + "/";
- }
- return new Uri.file(path);
+ return new Uri.directory(path);
}
Future<bool> exists() {
« no previous file with comments | « sdk/lib/core/uri.dart ('k') | tests/corelib/uri_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698