summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-10 11:19:50 +0000
committerrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-10 11:19:50 +0000
commit4d358286200983a8b9caef7c511510397e583658 (patch)
treec7f0f7e898c00df17fd98c45617fc0b47aee4676 /base/file_util.h
parentf75a0732cc627bc0205702c859b67637eac69c01 (diff)
downloadchromium_src-4d358286200983a8b9caef7c511510397e583658.zip
chromium_src-4d358286200983a8b9caef7c511510397e583658.tar.gz
chromium_src-4d358286200983a8b9caef7c511510397e583658.tar.bz2
Move and rename FdopenPlatformFile to file_util
This CL also improves error handling and adds a unit test. BUG=322664 Review URL: https://codereview.chromium.org/319543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275986 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 9c9072f..bb04e62 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -308,6 +308,10 @@ BASE_EXPORT FILE* OpenFile(const FilePath& filename, const char* mode);
// Closes file opened by OpenFile. Returns true on success.
BASE_EXPORT bool CloseFile(FILE* file);
+// Associates a standard FILE stream with an existing File. Note that this
+// functions take ownership of the existing File.
+BASE_EXPORT FILE* FileToFILE(File file, const char* mode);
+
// Truncates an open file to end at the location of the current file pointer.
// This is a cross-platform analog to Windows' SetEndOfFile() function.
BASE_EXPORT bool TruncateFile(FILE* file);