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

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

Issue 1083393004: Add uri getter on file system entity. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/io/directory.dart ('k') | sdk/lib/io/file.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 f450cb624d35d14e2d880f1d28460e5489758482..80d68be46caf9d528a08cad677e58354e3024382 100644
--- a/sdk/lib/io/directory_impl.dart
+++ b/sdk/lib/io/directory_impl.dart
@@ -43,6 +43,14 @@ class _Directory extends FileSystemEntity implements Directory {
}
}
+ Uri get uri {
+ String path = this.path;
+ if (!path.endsWith("/")) {
+ path = path + "/";
+ }
+ return new Uri.file(path);
+ }
+
Future<bool> exists() {
return _IOService._dispatch(_DIRECTORY_EXISTS, [path]).then((response) {
if (_isErrorResponse(response)) {
« no previous file with comments | « sdk/lib/io/directory.dart ('k') | sdk/lib/io/file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698