Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the API to create a file reference or "weak pointer" to a | 7 * This file defines the API to create a file reference or "weak pointer" to a |
| 8 * file in a file system. | 8 * file in a file system. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 label Chrome { | 11 label Chrome { |
| 12 M14 = 1.0, | 12 M14 = 1.0, |
| 13 M28 = 1.1 | 13 M28 = 1.1, |
| 14 M34 = 1.2 | |
| 14 }; | 15 }; |
| 15 | 16 |
| 16 /** | 17 /** |
| 17 * The <code>PPB_FileRef</code> struct represents a "weak pointer" to a file in | 18 * The <code>PPB_FileRef</code> struct represents a "weak pointer" to a file in |
| 18 * a file system. This struct contains a <code>PP_FileSystemType</code> | 19 * a file system. This struct contains a <code>PP_FileSystemType</code> |
| 19 * identifier and a file path string. | 20 * identifier and a file path string. |
| 20 */ | 21 */ |
| 21 interface PPB_FileRef { | 22 interface PPB_FileRef { |
| 22 /** | 23 /** |
| 23 * Create() creates a weak pointer to a file in the given file system. File | 24 * Create() creates a weak pointer to a file in the given file system. File |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 * @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>. |
| 110 * Succeeds if the directory already exists. Fails if ancestor directories | 111 * Succeeds if the directory already exists. Fails if ancestor directories |
| 111 * do not exist and <code>make_ancestors</code> was passed as | 112 * do not exist and <code>make_ancestors</code> was passed as |
| 112 * <code>PP_FALSE</code>. | 113 * <code>PP_FALSE</code>. |
| 113 */ | 114 */ |
| 114 int32_t MakeDirectory([in] PP_Resource directory_ref, | 115 int32_t MakeDirectory([in] PP_Resource directory_ref, |
| 115 [in] PP_Bool make_ancestors, | 116 [in] PP_Bool make_ancestors, |
| 116 [in] PP_CompletionCallback callback); | 117 [in] PP_CompletionCallback callback); |
| 117 | 118 |
| 118 /** | 119 /** |
| 120 * MakeDirectoryExclusive() makes a new directory in the file system as well | |
| 121 * as any parent directories if the <code>make_ancestors</code> argument is | |
| 122 * <code>PP_TRUE</code>. It is not valid to make a directory in the external | |
| 123 * file system. | |
| 124 * | |
| 125 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file | |
| 126 * reference. | |
| 127 * @param[in] make_ancestors A <code>PP_Bool</code> set to | |
| 128 * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code> | |
| 129 * if ancestor directories are not needed. | |
| 130 * | |
| 131 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
| 132 * Fails if the directory already exists or if ancestor directories do not | |
| 133 * exist and <code>make_ancestors</code> was passed as <code>PP_FALSE</code>. | |
| 134 */ | |
| 135 [version=1.2] | |
| 136 int32_t MakeDirectoryExclusive([in] PP_Resource directory_ref, | |
|
raymes
2013/12/19 23:10:23
Can we instead just add a PP_Bool to MakeDirectory
nhiroki
2013/12/20 01:54:20
Oh, I see. I assumed we have to add new function w
| |
| 137 [in] PP_Bool make_ancestors, | |
| 138 [in] PP_CompletionCallback callback); | |
| 139 | |
| 140 /** | |
| 119 * Touch() Updates time stamps for a file. You must have write access to the | 141 * Touch() Updates time stamps for a file. You must have write access to the |
| 120 * file if it exists in the external filesystem. | 142 * file if it exists in the external filesystem. |
| 121 * | 143 * |
| 122 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file | 144 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file |
| 123 * reference. | 145 * reference. |
| 124 * @param[in] last_access_time The last time the file was accessed. | 146 * @param[in] last_access_time The last time the file was accessed. |
| 125 * @param[in] last_modified_time The last time the file was modified. | 147 * @param[in] last_modified_time The last time the file was modified. |
| 126 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 148 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 127 * completion of Touch(). | 149 * completion of Touch(). |
| 128 * | 150 * |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 * completion. | 219 * completion. |
| 198 * | 220 * |
| 199 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 221 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 200 */ | 222 */ |
| 201 [version=1.1] | 223 [version=1.1] |
| 202 int32_t ReadDirectoryEntries([in] PP_Resource file_ref, | 224 int32_t ReadDirectoryEntries([in] PP_Resource file_ref, |
| 203 [in] PP_ArrayOutput output, | 225 [in] PP_ArrayOutput output, |
| 204 [in] PP_CompletionCallback callback); | 226 [in] PP_CompletionCallback callback); |
| 205 }; | 227 }; |
| 206 | 228 |
| OLD | NEW |