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

Unified Diff: base/file_util.h

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | 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 095734bdc8ff2247045f7fbd1f88d122765b2e4f..e6d7ac8fc40a593abfa55618bd02c6c68907b23c 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -116,27 +116,27 @@ BASE_EXPORT bool CopyDirectory(const FilePath& from_path,
// false otherwise.
BASE_EXPORT bool PathExists(const FilePath& path);
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
-
// Returns true if the given path is writable by the user, false otherwise.
-BASE_EXPORT bool PathIsWritable(const base::FilePath& path);
+BASE_EXPORT bool PathIsWritable(const FilePath& path);
// Returns true if the given path exists and is a directory, false otherwise.
-BASE_EXPORT bool DirectoryExists(const base::FilePath& path);
+BASE_EXPORT bool DirectoryExists(const FilePath& path);
// Returns true if the contents of the two files given are equal, false
// otherwise. If either file can't be read, returns false.
-BASE_EXPORT bool ContentsEqual(const base::FilePath& filename1,
- const base::FilePath& filename2);
+BASE_EXPORT bool ContentsEqual(const FilePath& filename1,
+ const FilePath& filename2);
// Returns true if the contents of the two text files given are equal, false
// otherwise. This routine treats "\r\n" and "\n" as equivalent.
-BASE_EXPORT bool TextContentsEqual(const base::FilePath& filename1,
- const base::FilePath& filename2);
+BASE_EXPORT bool TextContentsEqual(const FilePath& filename1,
+ const FilePath& filename2);
+
+} // namespace base
+
+// -----------------------------------------------------------------------------
+
+namespace file_util {
// Read the file at |path| into |contents|, returning true on success.
// This function fails if the |path| contains path traversal components ('..').
« no previous file with comments | « no previous file | base/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698