| 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 system associated with a file. | 7 * This file defines the API to create a file system associated with a file. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 label Chrome { | 10 label Chrome { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 * invalid or some type other than <code>PPB_FileSystem</code>. | 39 * invalid or some type other than <code>PPB_FileSystem</code>. |
| 40 */ | 40 */ |
| 41 PP_Bool IsFileSystem([in] PP_Resource resource); | 41 PP_Bool IsFileSystem([in] PP_Resource resource); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Open() opens the file system. A file system must be opened before running | 44 * Open() opens the file system. A file system must be opened before running |
| 45 * any other operation on it. | 45 * any other operation on it. |
| 46 * | 46 * |
| 47 * @param[in] file_system A <code>PP_Resource</code> corresponding to a file | 47 * @param[in] file_system A <code>PP_Resource</code> corresponding to a file |
| 48 * system. | 48 * system. |
| 49 * @param[in] expected_size The expected size of the file system. | 49 * |
| 50 * @param[in] expected_size The expected size of the file system. Note that |
| 51 * this does not request quota; to do that, you must either invoke |
| 52 * requestQuota from JavaScript: |
| 53 * http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quot
a |
| 54 * or set the unlimitedStorage permission for Chrome Web Store apps: |
| 55 * http://code.google.com/chrome/extensions/manifest.html#permissions |
| 56 * |
| 50 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 57 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 51 * completion of Open(). | 58 * completion of Open(). |
| 52 * | 59 * |
| 53 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 60 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 54 */ | 61 */ |
| 55 int32_t Open([in] PP_Resource file_system, | 62 int32_t Open([in] PP_Resource file_system, |
| 56 [in] int64_t expected_size, | 63 [in] int64_t expected_size, |
| 57 [in] PP_CompletionCallback callback); | 64 [in] PP_CompletionCallback callback); |
| 58 | 65 |
| 59 /** | 66 /** |
| 60 * GetType() returns the type of the provided file system. | 67 * GetType() returns the type of the provided file system. |
| 61 * | 68 * |
| 62 * @param[in] file_system A <code>PP_Resource</code> corresponding to a file | 69 * @param[in] file_system A <code>PP_Resource</code> corresponding to a file |
| 63 * system. | 70 * system. |
| 64 * | 71 * |
| 65 * @return A <code>PP_FileSystemType</code> with the file system type if | 72 * @return A <code>PP_FileSystemType</code> with the file system type if |
| 66 * valid or <code>PP_FILESYSTEMTYPE_INVALID</code> if the provided resource | 73 * valid or <code>PP_FILESYSTEMTYPE_INVALID</code> if the provided resource |
| 67 * is not a valid file system. It is valid to call this function even before | 74 * is not a valid file system. It is valid to call this function even before |
| 68 * Open() completes. | 75 * Open() completes. |
| 69 */ | 76 */ |
| 70 PP_FileSystemType GetType([in] PP_Resource file_system); | 77 PP_FileSystemType GetType([in] PP_Resource file_system); |
| 71 }; | 78 }; |
| 72 | 79 |
| OLD | NEW |