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

Unified Diff: base/file_util.cc

Issue 93263002: Move some more file utils to the 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/file_util.h ('k') | base/file_util_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.cc
diff --git a/base/file_util.cc b/base/file_util.cc
index 5e9790efe46b82437db165845fc71ebaf1deef3d..1f8ba8193d90e7759d4a093d4226475b230a1712 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -145,6 +145,14 @@ bool ReadFileToString(const FilePath& path, std::string* contents) {
return true;
}
+bool IsDirectoryEmpty(const FilePath& dir_path) {
+ FileEnumerator files(dir_path, false,
+ FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ if (files.Next().empty())
+ return true;
+ return false;
+}
+
} // namespace base
// -----------------------------------------------------------------------------
@@ -155,14 +163,6 @@ using base::FileEnumerator;
using base::FilePath;
using base::kMaxUniqueFiles;
-bool IsDirectoryEmpty(const FilePath& dir_path) {
- FileEnumerator files(dir_path, false,
- FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
- if (files.Next().empty())
- return true;
- return false;
-}
-
FILE* CreateAndOpenTemporaryFile(FilePath* path) {
FilePath directory;
if (!GetTempDir(&directory))
« no previous file with comments | « base/file_util.h ('k') | base/file_util_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698