I want to delete all files from cordova.file.applicationStorageDirectory, and the problem is that I don't have the file names and every code that I found needs a file name.
Here's one example.
var path = "file:///storage/emulated/0";
var filename = "myfile.txt";
window.resolveLocalFileSystemURL(path, function(dir) {
dir.getFile(filename, {create:false}, function(fileEntry) {
fileEntry.remove(function(){
// The file has been removed succesfully
},function(error){
// Error deleting the file
},function(){
// The file doesn't exist
});
});
});