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

Unified Diff: base/file_util.h

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: call the right function on windows 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
« 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 13190dceff09769e6f94c3a171ce541950f6ceb4..b75a18dffc735a82553dc8b47d2e1500c87cb5cf 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -269,6 +269,12 @@ BASE_EXPORT bool CreateTemporaryDirInDir(
// Creates a directory, as well as creating any parent directories, if they
// don't exist. Returns 'true' on successful creation, or if the directory
// already exists. The directory is only readable by the current user.
+// Returns true on success, leaving *error unchanged.
+// Returns false on failure and sets *error appropriately, if it is non-NULL.
+BASE_EXPORT bool CreateDirectoryAndGetError(const base::FilePath& full_path,
+ base::PlatformFileError* error);
+
+// Backward-compatible convenience method for the above.
BASE_EXPORT bool CreateDirectory(const base::FilePath& full_path);
// Returns the file size. Returns true on success.
« 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