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

Side by Side 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: fix win build Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_FILE_REF_H_ 5 #ifndef PPAPI_CPP_FILE_REF_H_
6 #define PPAPI_CPP_FILE_REF_H_ 6 #define PPAPI_CPP_FILE_REF_H_
7 7
8 #include "ppapi/c/pp_file_info.h" 8 #include "ppapi/c/pp_file_info.h"
9 #include "ppapi/c/pp_stdint.h" 9 #include "ppapi/c/pp_stdint.h"
10 #include "ppapi/c/ppb_file_ref.h" 10 #include "ppapi/c/ppb_file_ref.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 /// GetParent() returns the parent directory of this file. If 84 /// GetParent() returns the parent directory of this file. If
85 /// <code>file_ref</code> points to the root of the filesystem, then the root 85 /// <code>file_ref</code> points to the root of the filesystem, then the root
86 /// is returned. 86 /// is returned.
87 /// 87 ///
88 /// @return A <code>FileRef</code> containing the parent directory of the 88 /// @return A <code>FileRef</code> containing the parent directory of the
89 /// file. This function fails if the file system type is 89 /// file. This function fails if the file system type is
90 /// <code>PP_FileSystemType_External</code>. 90 /// <code>PP_FileSystemType_External</code>.
91 FileRef GetParent() const; 91 FileRef GetParent() const;
92 92
93 /// MakeDirectory() makes a new directory in the file system. It is not 93 /// MakeDirectory() makes a new directory in the file system according to the
94 /// valid to make a directory in the external file system. 94 /// given <code>make_directory_flags</code>, which is a bit-mask of the
95 /// <strong>Note:</strong> Use MakeDirectoryIncludingAncestors() to create 95 /// <code>PP_MakeDirectoryFlags</code> values. It is not valid to make a
96 /// parent directories. 96 /// directory in the external file system.
97 /// 97 ///
98 /// @param[in] exclusive A <code>bool</code> set to <code>true</code> to fail
yzshen1 2014/01/07 17:59:23 Please remove this @param
nhiroki 2014/01/08 06:12:33 Done.
99 /// if the directory already exists.
100 /// @param[in] make_directory_flags A bit-mask of the
101 /// <code>PP_MakeDirectoryFlags</code> values. Valid values are:
yzshen1 2014/01/07 17:59:23 it seems unnecessary to list valid values here. re
nhiroki 2014/01/08 06:12:33 Done.
102 /// - PP_MAKEDIRECTORYFLAG_NONE
103 /// - PP_MAKEDIRECTORYFLAG_WITH_ANCESTORS
104 /// - PP_MAKEDIRECTORYFLAG_EXCLUSIVE
105 /// See <code>PP_MakeDirectoryFlags</code> in <code>ppb_file_ref.h</code> for
106 /// more details on these flags.
98 /// @param[in] cc A <code>CompletionCallback</code> to be called upon 107 /// @param[in] cc A <code>CompletionCallback</code> to be called upon
99 /// completion of MakeDirectory(). 108 /// completion of MakeDirectory().
100 /// 109 ///
101 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 110 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
102 /// Succeeds if the directory already exists. Fails if ancestor 111 int32_t MakeDirectory(int32_t make_directory_flags,
103 /// directortories do not exist (see MakeDirectoryIncludingAncestors for the 112 const CompletionCallback& cc);
104 /// alternative).
105 int32_t MakeDirectory(const CompletionCallback& cc);
106
107 /// MakeDirectoryIncludingAncestors() makes a new directory in the file
108 /// system as well as any parent directories. It is not valid to make a
109 /// directory in the external file system.
110 ///
111 /// @param[in] cc A <code>CompletionCallback</code> to be called upon
112 /// completion of MakeDirectoryIncludingAncestors().
113 ///
114 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
115 /// Succeeds if the directory already exists.
116 int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc);
117 113
118 /// Touch() Updates time stamps for a file. You must have write access to the 114 /// Touch() Updates time stamps for a file. You must have write access to the
119 /// file if it exists in the external filesystem. 115 /// file if it exists in the external filesystem.
120 /// 116 ///
121 /// @param[in] last_access_time The last time the file was accessed. 117 /// @param[in] last_access_time The last time the file was accessed.
122 /// @param[in] last_modified_time The last time the file was modified. 118 /// @param[in] last_modified_time The last time the file was modified.
123 /// @param[in] cc A <code>CompletionCallback</code> to be called upon 119 /// @param[in] cc A <code>CompletionCallback</code> to be called upon
124 /// completion of Touch(). 120 /// completion of Touch().
125 /// 121 ///
126 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 122 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 /// 178 ///
183 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 179 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
184 int32_t ReadDirectoryEntries( 180 int32_t ReadDirectoryEntries(
185 const CompletionCallbackWithOutput< std::vector<DirectoryEntry> >& 181 const CompletionCallbackWithOutput< std::vector<DirectoryEntry> >&
186 callback); 182 callback);
187 }; 183 };
188 184
189 } // namespace pp 185 } // namespace pp
190 186
191 #endif // PPAPI_CPP_FILE_REF_H_ 187 #endif // PPAPI_CPP_FILE_REF_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698