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

Unified Diff: runtime/bin/file.dart

Issue 8598011: Implement delete on File objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 c3d12dde71bf4f47feb3e106676a49b2367a10e7..dfb32c8ea5e4de56251f44e0d99684e5970b2fe3 100644
--- a/runtime/bin/file.dart
+++ b/runtime/bin/file.dart
@@ -36,6 +36,18 @@ interface File factory _File {
void createSync();
/**
+ * Delete the file. The [deleteHandler] is called when the file has
+ * been successfully deleted. The [errorHandler] is called if the
+ * file cannot be deleted.
+ */
+ void delete();
+
+ /**
+ * Synchronously delete the file.
+ */
+ void deleteSync();
+
+ /**
* Open the file for random access operations. When the file is
* opened the openHandler is called. Opened files must be closed
* using the [close] method. By default writable is false.
@@ -202,6 +214,7 @@ interface File factory _File {
// Event handlers.
void set existsHandler(void handler(bool exists));
void set createHandler(void handler());
+ void set deleteHandler(void handler());
void set openHandler(void handler());
void set closeHandler(void handler());
void set readByteHandler(void handler(int byte));

Powered by Google App Engine
This is Rietveld 408576698