Skip to content

Instantly share code, notes, and snippets.

@glynrob
Last active December 14, 2015 03:29
Show Gist options
  • Save glynrob/5021087 to your computer and use it in GitHub Desktop.
Save glynrob/5021087 to your computer and use it in GitHub Desktop.
filesystem api start
function kickUpFileSystem(){
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
try{
window.webkitStorageInfo.requestQuota(typeFileSystem, 5*1024*1024 /*5MB*/, function(grantedBytes) {
window.requestFileSystem(typeFileSystem, grantedBytes, function(filesystem) {
fs = filesystem;
fileSystemLoaded();
}, errorHandler);
}, function(e) {
console.log('Error', e);
});
} catch( error ) {
alert('Filesystem API is not supported on this browser\nPlease use Chrome');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment