Take the 2-minute tour ×

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.

The Code goes like this:

 window.requestFileSystem  = window.requestFileSystem || window.webkitRequestFileSystem;

            function onInitFs(fs)
                fs.root.getFile('fpslog.txt', {create: false}, function(fileEntry) {

                        fileEntry.createWriter(function(fileWriter) {


                             fileWriter.onwriteend = function(e) {
                              console.log('Write completed.');

                              fileWriter.onerror = function(e) {

                          // Create a new Blob and write it to log.txt.


                        }, errorHandler);

                      }, errorHandler);



and the ERROR function:

function errorHandler(e) {
                  var msg = '';

                  switch (e.code) {
                    case FileError.QUOTA_EXCEEDED_ERR:
                      msg = 'QUOTA_EXCEEDED_ERR';
                    case FileError.NOT_FOUND_ERR:
                      msg = 'NOT_FOUND_ERR';
                    case FileError.SECURITY_ERR:
                      msg = 'SECURITY_ERR';
                    case FileError.INVALID_MODIFICATION_ERR:
                      msg = 'INVALID_MODIFICATION_ERR';
                    case FileError.INVALID_STATE_ERR:
                      msg = 'INVALID_STATE_ERR';
                      msg = 'Unknown Error';

                  console.log('Error: ' + msg);

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.

share|improve this question
@E-Riz, I want to know how to store floating point numbers, integer values using Blob. How can I add space between one insert and other insert of Blob data into the file. Any help please.. –  three.jsaddict Nov 16 '12 at 1:20

2 Answers 2

up vote 2 down vote accepted

You can also view the files using the root directory's filesystem: URL. Open filesystem:<YOUR_ORIGIN>/temporary/ in the address bar, replacing with the origin your app is running off of (e.g. "http://stackoverflow.com").

You can also enable "FileSystem inspection" in the DevTools under experiments. This may also require you to "Enable Experimental DevTools features" in about:flags.

share|improve this answer
How can I store integers and decimals dynamically with Blob using FileSystem API? A sample snippet would be helpful. –  three.jsaddict Nov 16 '12 at 20:42
Couldn't you store numbers in a .txt/.json file and read them back using the Filesystem and FileReader APIs? Also, you could store a serialized array of values, and JSON.parse() the data back into JS after reading it. –  ebidel Nov 17 '12 at 21:48
I just want to store the values dynamically in local repository. Later, I want those values to plot the graph. For this scenario, I couldn't find any solution. Using FileSystem API, while storing the values dynamically which are returned values from a javascript function, Blob is storing the whole function rather storing the values returned from function. for ex: var blob = new Blob(['The values are: ', +getValues()]); fliewriter.write(blob); In the above scenario, rather storing values it is storing (function getvalues() { return value; } ). Any solution? –  three.jsaddict Nov 17 '12 at 21:59

I found out way, using google chrome plugin which helps you to view the content of filesystem API of HTML5.

share|improve this answer

Your Answer


