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

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: 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..362dd2a619eda8fd28d493e5369d3ffbd28da5c7 100644
--- a/ppapi/cpp/file_ref.h
+++ b/ppapi/cpp/file_ref.h
@@ -115,6 +115,22 @@ class FileRef : public Resource {
/// Succeeds if the directory already exists.
int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc);
+ /// MakeDirectoryExclusive() 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] make_ancestors A <code>PP_Bool</code> set to
+ /// <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code>
+ /// if ancestor directories are not needed.
+ /// @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>.
+ /// Fails if the directory already exists or if ancestor directories do not
+ /// exist and <code>make_ancestors</code> was passed as <code>PP_FALSE</code>.
+ int32_t MakeDirectoryExclusive(PP_Bool make_ancestors,
teravest 2013/12/19 17:18:20 It's sad that this looks different than MakeDirect
raymes 2013/12/19 23:10:23 It seems a bit weird that we made a whole new func
+ 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.
///
« ppapi/api/ppb_file_ref.idl ('K') | « ppapi/c/ppb_file_ref.h ('k') | ppapi/cpp/file_ref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698