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

Unified Diff: runtime/bin/file.dart

Issue 9416096: Implement File.directory() and File.directorySync() to get (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Implement async version using isolate Created 8 years, 10 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: runtime/bin/file.dart
diff --git a/runtime/bin/file.dart b/runtime/bin/file.dart
index cfc5b77d3e67930d4cb9c518602d4e834d597d59..48687f6a91a0874c20ec03ee6248b4c13ba594a0 100644
--- a/runtime/bin/file.dart
+++ b/runtime/bin/file.dart
@@ -68,6 +68,20 @@ interface File default _File {
void deleteSync();
/**
+ * Get a Directory object for the directory containing this file. If
+ * the file does not exist the [errorHandler] is called. When the
+ * operation completes the [directoryHandler] is called with the
+ * result.
+ */
+ void directory();
+
+ /**
+ * Synchronously get a Directory object for the directory containing
+ * this file.
+ */
+ Directory directorySync();
+
+ /**
* Open the file for random access operations. When the file is
* opened the [openHandler] is called with the resulting
* RandomAccessFile. RandomAccessFiles must be closed using the
@@ -185,6 +199,12 @@ interface File default _File {
void set deleteHandler(void handler());
/**
+ * Sets the handler that gets called when a [directory] operation
+ * completes.
+ */
+ void set directoryHandler(void handler(Directory directory));
+
+ /**
* Sets the handler that gets called when an [open] operation
* completes.
*/
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_impl.dart » ('j') | runtime/bin/file_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698