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

Unified Diff: runtime/bin/file.dart

Issue 10065013: Support length operation without opening file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix error message and fix Windows port Created 8 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 | « runtime/bin/file.cc ('k') | runtime/bin/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.dart
diff --git a/runtime/bin/file.dart b/runtime/bin/file.dart
index d0380a924064df45f4b2aced4be1bb0c58e2ded5..ed177a8bdce30ecc40d71c18a87121afc4dce2ea 100644
--- a/runtime/bin/file.dart
+++ b/runtime/bin/file.dart
@@ -83,6 +83,17 @@ interface File default _File {
Directory directorySync();
/**
+ * Get the length of the file. When the operation completes the
+ * callback is called with the length.
+ */
+ void length(void callback(int length));
+
+ /**
+ * Synchronously get the length of the file.
+ */
+ int lengthSync();
+
+ /**
* Open the file for random access operations. When the file is
* opened the callback is called with the resulting
* RandomAccessFile. RandomAccessFiles must be closed using the
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698