Teee Teee - 1 month ago 14
Android Question

How to use the filesystem with cordova

I'm currently working on an Android app that uses the filesystem. I can't figure out how to use the native filesystem (the one you access if you use the

cordova-plugin-file
) How do I write and read files ?

I've looked at the filesystem tutorial by HTML5rocks but that's for chrome.

Answer

Look at the official repository. At the bottom, there's a pretty useful example section.

If you are searching for an API that's similar to the node.js fs-module than you should look at the npm package html5-fs which basically binds the cordova-plugin-file api to a node.js like API. (npm install html5-fs)