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

Unified Diff: base/file_util.h

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 4af6c97ad6257832f258f515de729f7f5efffc30..e6359787a46cad36886d185a7f451b5fd3fa433c 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -328,20 +328,22 @@ BASE_EXPORT bool TruncateFile(FILE* file);
// the number of read bytes, or -1 on error.
BASE_EXPORT int ReadFile(const 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,
+BASE_EXPORT int WriteFile(const FilePath& filename, const char* data,
int size);
+
#if defined(OS_POSIX)
// Append the data to |fd|. Does not close |fd| when done.
BASE_EXPORT int WriteFileDescriptor(const int fd, const char* data, int size);
#endif
+
+} // namespace base
+
+// -----------------------------------------------------------------------------
+
+namespace file_util {
+
// Append the given buffer into the file. Returns the number of bytes written,
// or -1 on error.
BASE_EXPORT int AppendToFile(const base::FilePath& filename,

Powered by Google App Engine
This is Rietveld 408576698