Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Using RequestFileSystem within Chrome Extension</h2> <p>In order to use the FileSystem API as a root filesystem for your Chrome extension, you can actually use <code>window.webkitRequestFileSystem</code> instead of <code>requestQuota</code>.</p> <pre><code>window.webkitRequestFileSystem(window.PERSISTENT, 1024 * 1024, function (filesystem) { console.log(filesystem); console.log(filesystem.root); }, function (e) { console.log("Could not request File System"); }); </code></pre> <p>This does print correctly on Chrome 15,16 and 17 for me:</p> <pre><code>DOMFileSystem DirectoryEntry </code></pre> <hr> <h2>Using requestQuota for HTML5 apps</h2> <p>Just for reference, this would be the way to actually request the quota (i.e., when not using a Chrome Extension). You have to request the quota (the user sees a little banner at the top of his/her window) first. The RequestFileSystem is called if the user accepts. </p> <pre><code>window.webkitStorageInfo.requestQuota(PERSISTENT, 1024*1024, function(grantedBytes) { window.webkitRequestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); }, function(e) { console.log('Error requesting filesystem', e); }); </code></pre> <p>Eventually it might be necessary to request quota within an extension. Currently this can be circumvented with the <code>unlimitedStorage</code> permission. For the current state of implementation/storage types, see <a href="http://code.google.com/chrome/whitepapers/storage.html" rel="nofollow">http://code.google.com/chrome/whitepapers/storage.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload