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 | |
yzshen1
2013/12/20 18:18:55
please consider [channel=dev] tag.
nhiroki
2014/01/06 13:24:22
Done.
| |
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 */ |
114 int32_t MakeDirectory([in] PP_Resource directory_ref, | 115 int32_t MakeDirectory([in] PP_Resource directory_ref, |
raymes
2013/12/22 23:07:37
I think we probably want to annotate this with [de
nhiroki
2014/01/06 13:24:22
Done.
| |
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 * MakeDirectory() makes a new directory in the file system as well as any | |
121 * 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] exclusive A <code>PP_Bool</code> set to <code>PP_TRUE</code> to | |
128 * fail if the directory already exists. | |
129 * @param[in] make_ancestors A <code>PP_Bool</code> set to | |
130 * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code> | |
131 * if ancestor directories are not needed. | |
132 * | |
133 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
134 * Fails if the directory already exists and <code>exclusive</code> was passed | |
135 * as <code>PP_TRUE</code>. And also fails if ancestor directories do not | |
136 * exist and <code>make_ancestors</code> was passed as <code>PP_FALSE</code>. | |
137 */ | |
138 [version=1.2] | |
139 int32_t MakeDirectory([in] PP_Resource directory_ref, | |
140 [in] PP_Bool exclusive, | |
141 [in] PP_Bool make_ancestors, | |
142 [in] PP_CompletionCallback callback); | |
143 | |
144 /** | |
119 * Touch() Updates time stamps for a file. You must have write access to the | 145 * Touch() Updates time stamps for a file. You must have write access to the |
120 * file if it exists in the external filesystem. | 146 * file if it exists in the external filesystem. |
121 * | 147 * |
122 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file | 148 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file |
123 * reference. | 149 * reference. |
124 * @param[in] last_access_time The last time the file was accessed. | 150 * @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. | 151 * @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 | 152 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
127 * completion of Touch(). | 153 * completion of Touch(). |
128 * | 154 * |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 * completion. | 223 * completion. |
198 * | 224 * |
199 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 225 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
200 */ | 226 */ |
201 [version=1.1] | 227 [version=1.1] |
202 int32_t ReadDirectoryEntries([in] PP_Resource file_ref, | 228 int32_t ReadDirectoryEntries([in] PP_Resource file_ref, |
203 [in] PP_ArrayOutput output, | 229 [in] PP_ArrayOutput output, |
204 [in] PP_CompletionCallback callback); | 230 [in] PP_CompletionCallback callback); |
205 }; | 231 }; |
206 | 232 |
OLD | NEW |