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

Unified Diff: net/base/file_stream.h

Issue 39301: Adds truncate to FileStream. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « no previous file | net/base/file_stream_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream.h
===================================================================
--- net/base/file_stream.h (revision 11127)
+++ net/base/file_stream.h (working copy)
@@ -109,6 +109,11 @@
// You can pass NULL as the callback for synchronous I/O.
int Write(const char* buf, int buf_len, CompletionCallback* callback);
+ // Truncates the file to be |bytes| length. This is only valid for writable
+ // files. After truncation the file stream is positioned at |bytes|. The new
+ // position is retured, or a value < 0 on error.
+ int64 Truncate(int64 bytes);
+
private:
class AsyncContext;
friend class AsyncContext;
« no previous file with comments | « no previous file | net/base/file_stream_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698