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

Unified Diff: ppapi/cpp/file_ref.h

Issue 113363004: PPAPI: Add new PPB_FileRef.MakeDirectory to support exclusive operation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge MakeDirectory*() into MakeDirectory() 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
Index: ppapi/cpp/file_ref.h
diff --git a/ppapi/cpp/file_ref.h b/ppapi/cpp/file_ref.h
index 452d2a61321866ba44ec2f70d3cf6b9db78417eb..cd0d96c9c92a9db5ec5c9c3ef3fbe2d64c31c62e 100644
--- a/ppapi/cpp/file_ref.h
+++ b/ppapi/cpp/file_ref.h
@@ -90,30 +90,27 @@ class FileRef : public Resource {
/// <code>PP_FileSystemType_External</code>.
FileRef GetParent() const;
- /// MakeDirectory() makes a new directory in the file system. It is not
- /// valid to make a directory in the external file system.
- /// <strong>Note:</strong> Use MakeDirectoryIncludingAncestors() to create
- /// parent directories.
- ///
+ /// MakeDirectory() makes a new directory in the file system as well as any
+ /// parent directories if the <code>make_ancestors</code> argument is
+ /// <code>true</code>. It is not valid to make a directory in the external
+ /// file system.
+ ///
+ /// @param[in] exclusive A <code>bool</code> set to <code>true</code> to fail
+ /// if the directory already exists.
+ /// @param[in] make_ancestors A <code>bool</code> set to <code>true</code> to
+ /// make ancestor directories or <code>false</code> if ancestor directories
+ /// are not needed.
/// @param[in] cc A <code>CompletionCallback</code> to be called upon
/// completion of MakeDirectory().
///
/// @return An int32_t containing an error code from <code>pp_errors.h</code>.
- /// Succeeds if the directory already exists. Fails if ancestor
- /// directortories do not exist (see MakeDirectoryIncludingAncestors for the
- /// alternative).
- int32_t MakeDirectory(const CompletionCallback& cc);
-
- /// MakeDirectoryIncludingAncestors() makes a new directory in the file
- /// system as well as any parent directories. It is not valid to make a
- /// directory in the external file system.
- ///
- /// @param[in] cc A <code>CompletionCallback</code> to be called upon
- /// completion of MakeDirectoryIncludingAncestors().
- ///
- /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
- /// Succeeds if the directory already exists.
- int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc);
+ /// Fails if the directory already exists and <code>exclusive</code> was
+ /// passed as <code>true</code>. And also fails if ancestor directortories
+ /// do not exist and <code>make_ancestors</code> was passed as
+ /// <code>false</code>.
+ int32_t MakeDirectory(bool exclusive,
+ bool make_ancestors,
+ const CompletionCallback& cc);
/// Touch() Updates time stamps for a file. You must have write access to the
/// file if it exists in the external filesystem.

Powered by Google App Engine
This is Rietveld 408576698