/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
window.requestFileSystem( LocalFileSystem.PERSISTENT, 0, function doAccess( fs ) { // alert( 'Got file access' ); fs.root.getFile( SOURCE, { create: true, exclusive: false }, function( fe ) { reference = fe.fullPath; fe.createWriter( function( writer ) { // alert( 'Ready to write' ); writer.onwriteend = function( e ) { // alert( 'File written' ); }; writer.write( ' ' ); } ); }, function( err ) { // alert( 'No access to file entry' ); } ); }, function( err ) { // alert( 'File system not responding' ); } );
Comments
