OLD | NEW |
---|---|
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 /// system as well as any parent directories. It is not valid to make a | 108 /// system as well as any parent directories. It is not valid to make a |
109 /// directory in the external file system. | 109 /// directory in the external file system. |
110 /// | 110 /// |
111 /// @param[in] cc A <code>CompletionCallback</code> to be called upon | 111 /// @param[in] cc A <code>CompletionCallback</code> to be called upon |
112 /// completion of MakeDirectoryIncludingAncestors(). | 112 /// completion of MakeDirectoryIncludingAncestors(). |
113 /// | 113 /// |
114 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 114 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
115 /// Succeeds if the directory already exists. | 115 /// Succeeds if the directory already exists. |
116 int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc); | 116 int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc); |
117 | 117 |
118 /// MakeDirectoryExclusive() makes a new directory in the file system as well | |
119 /// as any parent directories. It is not valid to make a directory in the | |
120 /// external file system. | |
121 /// | |
122 /// @param[in] make_ancestors A <code>PP_Bool</code> set to | |
123 /// <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code> | |
124 /// if ancestor directories are not needed. | |
125 /// @param[in] cc A <code>CompletionCallback</code> to be called upon | |
126 /// completion of MakeDirectoryIncludingAncestors(). | |
127 /// | |
128 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
129 /// Fails if the directory already exists or if ancestor directories do not | |
130 /// exist and <code>make_ancestors</code> was passed as <code>PP_FALSE</code>. | |
131 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
| |
132 const CompletionCallback& cc); | |
133 | |
118 /// Touch() Updates time stamps for a file. You must have write access to the | 134 /// Touch() Updates time stamps for a file. You must have write access to the |
119 /// file if it exists in the external filesystem. | 135 /// file if it exists in the external filesystem. |
120 /// | 136 /// |
121 /// @param[in] last_access_time The last time the file was accessed. | 137 /// @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. | 138 /// @param[in] last_modified_time The last time the file was modified. |
123 /// @param[in] cc A <code>CompletionCallback</code> to be called upon | 139 /// @param[in] cc A <code>CompletionCallback</code> to be called upon |
124 /// completion of Touch(). | 140 /// completion of Touch(). |
125 /// | 141 /// |
126 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 142 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
127 int32_t Touch(PP_Time last_access_time, | 143 int32_t Touch(PP_Time last_access_time, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 /// | 198 /// |
183 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 199 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
184 int32_t ReadDirectoryEntries( | 200 int32_t ReadDirectoryEntries( |
185 const CompletionCallbackWithOutput< std::vector<DirectoryEntry> >& | 201 const CompletionCallbackWithOutput< std::vector<DirectoryEntry> >& |
186 callback); | 202 callback); |
187 }; | 203 }; |
188 | 204 |
189 } // namespace pp | 205 } // namespace pp |
190 | 206 |
191 #endif // PPAPI_CPP_FILE_REF_H_ | 207 #endif // PPAPI_CPP_FILE_REF_H_ |
OLD | NEW |