Get ready to explore the folders and their contents of the device's persistent storage. Use the following steps:
Open the command-line tool and create a new PhoneGap project named
FileSystem
.$ cordova create ~/the/path/to/your/source/filesystem com.gnstudio.pg.FileSystem FileSystem
Add the File API plugin using the command line.
$ cordova plugins https: //git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
Go to the
www
folder, open theindex.html
file, and add adiv
element with theid
value#fileslist
inside the maindiv
of the app, below the#deviceready
one.<div id='fileslist'></div>
Go to the
www/js
folder, open theindex.js
file, and define a new function namedrequestFileSystem
; the function has to be called once thedeviceready
event is fired.requestFileSystem: function(){ // The file system access request will go here }
In the body of the function, request access to the device filesystem specifying the...