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 [channel=dev] 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 * reference. | 105 * reference. |
105 * @param[in] make_ancestors A <code>PP_Bool</code> set to | 106 * @param[in] make_ancestors A <code>PP_Bool</code> set to |
106 * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code> | 107 * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code> |
107 * if ancestor directories are not needed. | 108 * if ancestor directories are not needed. |
108 * | 109 * |
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 */ |
115 [deprecate=1.2] | |
114 int32_t MakeDirectory([in] PP_Resource directory_ref, | 116 int32_t MakeDirectory([in] PP_Resource directory_ref, |
115 [in] PP_Bool make_ancestors, | 117 [in] PP_Bool make_ancestors, |
116 [in] PP_CompletionCallback callback); | 118 [in] PP_CompletionCallback callback); |
117 | 119 |
118 /** | 120 /** |
121 * MakeDirectory() makes a new directory in the file system as well as any | |
122 * parent directories if the <code>make_ancestors</code> argument is | |
123 * <code>PP_TRUE</code>. It is not valid to make a directory in the external | |
124 * file system. | |
125 * | |
126 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file | |
127 * reference. | |
128 * @param[in] exclusive A <code>PP_Bool</code> set to <code>PP_TRUE</code> to | |
129 * fail if the directory already exists. | |
130 * @param[in] make_ancestors A <code>PP_Bool</code> set to | |
131 * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code> | |
132 * if ancestor directories are not needed. | |
133 * | |
134 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
135 * Fails if the directory already exists and <code>exclusive</code> was passed | |
136 * as <code>PP_TRUE</code>. And also fails if ancestor directories do not | |
137 * exist and <code>make_ancestors</code> was passed as <code>PP_FALSE</code>. | |
138 */ | |
139 [version=1.2] | |
140 int32_t MakeDirectory([in] PP_Resource directory_ref, | |
141 [in] PP_Bool exclusive, | |
142 [in] PP_Bool make_ancestors, | |
dmichael (off chromium)
2014/01/06 18:08:09
At this point, might it make sense to move to a bi
yzshen1
2014/01/06 18:44:11
I like your idea. Thanks!
On 2014/01/06 18:08:09,
nhiroki
2014/01/07 07:32:45
Good idea! Addressed it in the latest patchset.
| |
143 [in] PP_CompletionCallback callback); | |
144 | |
145 /** | |
119 * Touch() Updates time stamps for a file. You must have write access to the | 146 * Touch() Updates time stamps for a file. You must have write access to the |
120 * file if it exists in the external filesystem. | 147 * file if it exists in the external filesystem. |
121 * | 148 * |
122 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file | 149 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file |
123 * reference. | 150 * reference. |
124 * @param[in] last_access_time The last time the file was accessed. | 151 * @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. | 152 * @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 | 153 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
127 * completion of Touch(). | 154 * completion of Touch(). |
128 * | 155 * |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 * completion. | 224 * completion. |
198 * | 225 * |
199 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 226 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
200 */ | 227 */ |
201 [version=1.1] | 228 [version=1.1] |
202 int32_t ReadDirectoryEntries([in] PP_Resource file_ref, | 229 int32_t ReadDirectoryEntries([in] PP_Resource file_ref, |
203 [in] PP_ArrayOutput output, | 230 [in] PP_ArrayOutput output, |
204 [in] PP_CompletionCallback callback); | 231 [in] PP_CompletionCallback callback); |
205 }; | 232 }; |
206 | 233 |
OLD | NEW |