I try to write a log file using IONIC2, all seems to work, not error, with IONIC2 the file exist the directory is created, but I can not see the file with a file explorer. See my source there :
File.checkDir(cordova.file.externalDataDirectory, 'mydir')
.then(_ => {
trace.info('yay')
})
.catch(err => {
trace.error('BackgroundGeolocationService','constructor',`boooh`);
File.createDir(cordova.file.externalDataDirectory, "mydir", false)
.then(function (success) {
// success
trace.info('create mydir success');
}, function (error) {
// error
trace.error('BackgroundGeolocationService','constructor',`unable to create mydir`);
}.bind(this));
});
File.createFile(cordova.file.externalDataDirectory, "new_file.txt", true)
.then(function (success) {
// success
trace.info('write file success');
}, function (error) {
// error
trace.error('BackgroundGeolocationService','constructor',`error:${error}`)
});