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

Unified Diff: runtime/bin/file_win.cc

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_win.cc
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index eaac7e656413bc775c005813cfef43a9739885f6..f565892414874401f92d9e4ceb0fc03ad44f25a5 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -69,6 +69,12 @@ off_t File::Position() {
}
+off_t File::Position(int64_t position) {
+ ASSERT(handle_->fd() >= 0);
+ return lseek(handle_->fd(), position, SEEK_SET);
+}
+
+
void File::Flush() {
ASSERT(handle_->fd());
_commit(handle_->fd());

Powered by Google App Engine
This is Rietveld 408576698