filer.js is a well tested wrapper library for the HTML5 Filesystem API, an API which enables web applications to read and write files and folders to to its own sandboxed filesystem.