I have used Cordova File Plugin to create files on mobile device. Below is the code to create files:
window.resolveLocalFileSystemURL(cordova.file.dataDirectory, function (dir) {
alert(cordova.file.dataDirectory);
dir.getFile("log.txt", { create: true }, function (file) {
alert("got the file: "+ file.name + ', ' + file.fullPath);
});
});
When I deploy the app on my android phone, the file will create successfully, but I can't find the created file on my device.
Although cordova.file.dataDirectory
is pointing to file:///data/data/io.cordova.myappId/files/
path on my device, the io.cordova.myappId
folder doesn't exist in data>data
path, but exists in Android>data
path. By the way, I checked both storage>Android>data>io.Cordova.myappId>files
& storage>data>data
and the file doesn't exist.
Is this because:
The created file is located in another place, so where can I find that?
or
Because it's private and my file manager doesn't have access to it, so how can I change the permission setting to have a public file?