I'm using native file plugin on Ionic 3 app.Can you please tell me how to use getFile() method on it? I can't find a proper implementation of that method.Its signature is like below.But I don't know how to give the directoryEntry parameter.
getFile(directoryEntry, fileName, flags)
constructor(private file: File, private platform: Platform) {
platform.ready()
.then(() => {
return this.file.resolveDirectoryUrl(this.file.dataDirectory)
})
.then((rootDir) => {
return this.file.getFile(rootDir, 'main.jpeg', { create: false })
})
.then((fileEntry) => {
fileEntry.file(file => {
console.log(file)
})
})
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With