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

Unified Diff: base/file_util.cc

Issue 15812007: Make file_util::CreateDirectory return an error, not just a bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: xml file; use the new errors Created 7 years, 6 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.cc
diff --git a/base/file_util.cc b/base/file_util.cc
index 58dbd795d34f54b24b7e89251b94c81d1d8e5ba5..10b5351b5992d7d165e47f387318c12893da7db4 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -183,6 +183,10 @@ FILE* CreateAndOpenTemporaryFile(FilePath* path) {
return CreateAndOpenTemporaryFileInDir(directory, path);
}
+bool CreateDirectory(const base::FilePath& full_path) {
+ return CreateDirectoryAndGetError(full_path, NULL);
+}
+
bool GetFileSize(const FilePath& file_path, int64* file_size) {
base::PlatformFileInfo info;
if (!GetFileInfo(file_path, &info))
« no previous file with comments | « base/file_util.h ('k') | base/file_util_posix.cc » ('j') | base/file_util_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698