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

Unified Diff: runtime/bin/file.dart

Issue 8578003: Implement setPosition on File to seek to a byte position. (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 a3f61fcacfadf3587c874bbd89a3d4eeb1c4de6b..c3d12dde71bf4f47feb3e106676a49b2367a10e7 100644
--- a/runtime/bin/file.dart
+++ b/runtime/bin/file.dart
@@ -126,17 +126,28 @@ interface File factory _File {
int writeStringSync(String string);
/**
- * Get the current position of the file. When the operation
+ * Get the current byte position in the file. When the operation
* completes the [positionHandler] is called with the position.
*/
void position();
/**
- * Synchronously get the current position of the file.
+ * Synchronously get the current byte position in the file.
*/
int positionSync();
/**
+ * Set the byte position in the file. When the operation completes
+ * the [setPositionHandler] is called.
+ */
+ void setPosition(int position);
+
+ /**
+ * Synchronously set the byte position in the file.
+ */
+ void setPositionSync(int position);
+
+ /**
* Get the length of the file. When the operation completes the
* [lengthHandler] is called with the length.
*/
@@ -197,6 +208,7 @@ interface File factory _File {
void set readListHandler(void handler(int read));
void set noPendingWriteHandler(void handler());
void set positionHandler(void handler(int position));
+ void set setPositionHandler(void handler());
void set lengthHandler(void handler(int length));
void set flushHandler(void handler());
void set fullPathHandler(void handler(String path));
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_impl.dart » ('j') | runtime/bin/file_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698