Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere can I see my stored data using FileSystem API?
    text
    copied!<p>I've successfully stored data using FILESYSTEM API provided by HTML5. But I don't know where I could identify the file in my local repository so that I can backup the data I stored. I have also check my root directory of application in the server (Tomcat 7.0), but I couldn't find the file. While using chrome developer tools, I checked the data is storing successfully.</p> <p>The Code goes like this:</p> <pre><code> window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; function onInitFs(fs) { fs.root.getFile('fpslog.txt', {create: false}, function(fileEntry) { // Create a FileWriter object for our FileEntry (log.txt). fileEntry.createWriter(function(fileWriter) { fileWriter.seek(fileWriter.length); // Start write position at EOF. fileWriter.onwriteend = function(e) { console.log('Write completed.'); }; fileWriter.onerror = function(e) { console.log('Write failed: ' + e.toString()); }; // Create a new Blob and write it to log.txt. var blob = new Blob(['Hello World'], {type: 'text/plain'}); fileWriter.write(blob); }, errorHandler); }, errorHandler); } window.requestFileSystem(window.TEMPORARY, 5*1024*1024 /*5MB*/, onInitFs, errorHandler); </code></pre> <p>and the ERROR function:</p> <pre><code>function errorHandler(e) { var msg = ''; switch (e.code) { case FileError.QUOTA_EXCEEDED_ERR: msg = 'QUOTA_EXCEEDED_ERR'; break; case FileError.NOT_FOUND_ERR: msg = 'NOT_FOUND_ERR'; break; case FileError.SECURITY_ERR: msg = 'SECURITY_ERR'; break; case FileError.INVALID_MODIFICATION_ERR: msg = 'INVALID_MODIFICATION_ERR'; break; case FileError.INVALID_STATE_ERR: msg = 'INVALID_STATE_ERR'; break; default: msg = 'Unknown Error'; break; }; console.log('Error: ' + msg); } </code></pre> <p>In developer tools, I did see no error print rather it is saying 'write completed', which means i'm able to create file somewhere and storing the data. I want to get to access that data to view. As already the tutorial mentioned, I don't see any file created in root folder. Any Help Please.</p>
 

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