Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <h2 id="manifest">Manifest</h2> | |
| 2 <p>You must declare the "fileSystemProvider" permission | |
| 3 in the <a href="manifest">extension manifest</a> | |
| 4 to use the File System Provider API. | |
| 5 For example:</p> | |
| 6 <pre data-filename="manifest.json"> | |
| 7 { | |
| 8 "name": "My extension", | |
| 9 ... | |
| 10 <b>"permissions": [ | |
| 11 "fileSystemProvider" | |
| 12 ]</b>, | |
| 13 ... | |
| 14 } | |
| 15 </pre> | |
| 16 | |
| 17 <h2 id="overview">Overview</h2> | |
| 18 <p> | |
| 19 File System Provider API allows to write extensions providing support for | |
|
not at google - send to devlin
2014/06/25 14:03:30
s/to write extensions providing support for/extens
mtomasz
2014/06/26 02:19:43
Done.
| |
| 20 virtual file systems, which are available in the file manager on Chrome OS. | |
| 21 Use cases include decompressing archives and accessing files in a cloud | |
| 22 service other than Drive. | |
| 23 </p> | |
| 24 | |
| 25 <h2 id="archives">File handlers</h2> | |
| 26 <p> | |
| 27 Provided file systems can either provide file system contents from an external | |
| 28 source (such as a remote server), or using a local file (such as an archive) as | |
| 29 its input. | |
| 30 </p> | |
| 31 <p> | |
| 32 In the second case, the providing extension should have a | |
| 33 <a href="manifest/file_handlers">file_handlers</a> manifest entry in order | |
| 34 to be launched when the file is selected in the file manager. | |
| 35 When the extension is executed with a file to be handled, it has to mount a | |
| 36 file system and start serving contents from the provided file. | |
| 37 </p> | |
| 38 | |
| 39 <h2 id="archives">Life cycle</h2> | |
| 40 <p> | |
| 41 Provided file systems once mounted are remembered by Chrome and remounted | |
| 42 automatically after reboot or restart. Hence, once a file system is | |
| 43 <a href="method-mount">mounted</a> by a providing extension, it will stay until | |
| 44 either the extension is unloaded, or the extension calls the | |
| 45 <a href="#method-unmount"> unmount</a> method. | |
| 46 </p> | |
| 47 <p> | |
| 48 In case of acting as a file handler, the handled file may need to be stored | |
| 49 to access it after either a reboot, or suspending and resuming an event page | |
| 50 of the providing extension. In such case | |
| 51 <a href="fileSystem#method-retainEntry">chrome.fileSystem.retainEntry</a> and | |
| 52 <a href="fileSystem#method-restoreEntry">chrome.fileSystem.restoreEntry</a> | |
| 53 should be used. | |
| 54 </p> | |
| OLD | NEW |