javascript - Reading HTML5 Filesystem after directory update -


i'm trying make dynamic interface interacting html5 filesystem in chrome canary, hitting stumbling block.

i use

dirreader.readentries(function (entries) {         if (!entries.length){             return;         }         (var = 0 ; < entries.length; i++){              $scope.files.push(entries[i]);         }          dirreader.readentries();      }, errorhandler); 

to them first time, works fine. if create new file, , run code again, returns nothing.

i imagine using old reference file system or that, imagine need reinitialize file system or directory reader (that's guess)? best way deal issue?

edit: getting new reference file system work, makes me vomit little. better way still excellent.

the excellent html5rocks website file handling

to read contents of directory, create directoryreader , call readentries() method. there no guarantee of directory's entries returned in single call readentries(). means need keep calling directoryreader.readentries() until no more results returned.

i read mean directoryreader 1 off object. once have read no more data it. instead of getting new file system reference try creating new directoryreader.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -