Everytime I want to access the filesystem, does my app need to call webkitRequestFileSystem
? Or is there some way to persist the filesystem stored in a variable across shutdowns and restarts?
For example:
DOMFileSystem
object in a variableIt's a hosted app, but this question also applies to any web app I believe.
You will always need to request a FileSystem, if that's what you need. To use the same one each time use a PERSISTENT type when requesting the file system.
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
window.requestFileSystem(window.PERSISTENT, size, successCallback, opt_errorCallback);
There are other local storage options that might suit you better if making this request is too onerous.