diff options
Diffstat (limited to 'base/file_util.h')
-rw-r--r-- | base/file_util.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/base/file_util.h b/base/file_util.h index 1fea6e8..3f892e3 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -299,19 +299,8 @@ BASE_EXPORT bool TouchFile(const FilePath& path, const Time& last_accessed, const Time& last_modified); -} // namespace base - -// ----------------------------------------------------------------------------- - -namespace file_util { - -#if defined(OS_POSIX) -// Store inode number of |path| in |inode|. Return true on success. -BASE_EXPORT bool GetInode(const base::FilePath& path, ino_t* inode); -#endif - // Wrapper for fopen-like calls. Returns non-NULL FILE* on success. -BASE_EXPORT FILE* OpenFile(const base::FilePath& filename, const char* mode); +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); @@ -324,6 +313,12 @@ BASE_EXPORT bool TruncateFile(FILE* file); // the number of read bytes, or -1 on error. BASE_EXPORT int ReadFile(const base::FilePath& filename, char* data, int size); +} // namespace base + +// ----------------------------------------------------------------------------- + +namespace file_util { + // Writes the given buffer into the file, overwriting any data that was // previously there. Returns the number of bytes written, or -1 on error. BASE_EXPORT int WriteFile(const base::FilePath& filename, const char* data, |