使用@ionic native/file获取目录中的文件
我使用以下代码编写文件:使用@ionic native/file获取目录中的文件,file,ionic-framework,native,File,Ionic Framework,Native,我使用以下代码编写文件: this.file.writeFile(`${this.file.externalRootDirectory}/app_name/.tmp`, `${this.countPictures}.jpg`, blob, options) .then(res => { this.countPictures++; this.file.resolveLocalFilesystemUrl(res.fullPath).then((dat
this.file.writeFile(`${this.file.externalRootDirectory}/app_name/.tmp`, `${this.countPictures}.jpg`, blob, options)
.then(res => {
this.countPictures++;
this.file.resolveLocalFilesystemUrl(res.fullPath).then((data) => {
this.alertService.show(JSON.stringify(data), 'long', 'bottom')
})
this.events.publish('update:badges', 'picture', res.nativeURL);
}, err => {
this.alertService.show(`${JSON.stringify(err)}`, 'long', 'bottom')
});
现在,我想得到这些文件,有多少。我尝试使用:this.file.resolveDirectoryUrl,但我不知道它是如何工作的
谢谢