I want to create a specific directory for my cordova project. I have no idea what to do for that. I refered so may links like, How to move file to app directory cordova
cordova, android app how to create subfolder and someother links. But it is not clear whether they are using any cordova plugins for this or we can do with pure javascript. These are not working for me. Please suggest if any plugins or functions are available.
Thanks.
You need to use this plugin: https://www.npmjs.com/package/cordova-plugin-file
I don't know what version of cordova do you use and if this plugin was updated, but when I use it, it doesn't work with WindowsPhone. Ok for Android and iOS.
To get file system:
Donwload file function:
To create a directory:
Where
onDirectorySuccess
andonDirectoryFail
are functions like:To get path of file in the directory:
And to get file:
To delete a file first you need to get it:
Then in success function:
My application was with file download, so this is code to save a file in a directory:
It's not your case but I hope it helps.