summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorloislo@chromium.org <loislo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-29 12:57:10 +0000
committerloislo@chromium.org <loislo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-29 12:57:10 +0000
commit891128f4847bfb32e10604ced9a3b93c0272a80d (patch)
tree001b3799eda821b47e2efa01a8412a194377fc8b /base/file_util.h
parent19bacfe41d03eede36a797ea37e8c8c2a477e995 (diff)
downloadchromium_src-891128f4847bfb32e10604ced9a3b93c0272a80d.zip
chromium_src-891128f4847bfb32e10604ced9a3b93c0272a80d.tar.gz
chromium_src-891128f4847bfb32e10604ced9a3b93c0272a80d.tar.bz2
AppendToFile implementation.
DevTools wants to save very big files like HeapSnapshots. It is not possible at the moment because the file can be about ~6Gb. BUG=none TEST=FileUtilTest.AppendToFile Review URL: http://codereview.chromium.org/10263003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/file_util.h b/base/file_util.h
index b6e634d..1eac1ca 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -378,6 +378,10 @@ BASE_EXPORT int WriteFile(const FilePath& filename, const char* data, int size);
// Append the data to |fd|. Does not close |fd| when done.
BASE_EXPORT int WriteFileDescriptor(const int fd, const char* data, int size);
#endif
+// Append the given buffer into the file. Returns the number of bytes written,
+// or -1 on error.
+BASE_EXPORT int AppendToFile(const FilePath& filename,
+ const char* data, int size);
// Gets the current working directory for the process.
BASE_EXPORT bool GetCurrentDirectory(FilePath* path);