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

Unified Diff: base/file_util.h

Issue 109043002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « base/event_recorder_win.cc ('k') | base/file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 1fea6e8492c281deb2457a556f6ceda8e24932d4..3f892e3ad14f9af432852af63ca14a438a1121c4 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,
« no previous file with comments | « base/event_recorder_win.cc ('k') | base/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698