From 891128f4847bfb32e10604ced9a3b93c0272a80d Mon Sep 17 00:00:00 2001 From: "loislo@chromium.org" Date: Sun, 29 Apr 2012 12:57:10 +0000 Subject: 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 --- base/file_util.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'base/file_util.h') 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); -- cgit v1.1