@bspark wrote:
Hello.
I want to use writeFile (Ionic Native Plugin) and for that, I need to set a path where the file will be written(the application’s root directory in my case).
I read a filePath doc, but I can’t find how I really use it.
constructor( public file: File) { }
writeFilePractice(){ let path: string; let content: 'content of file' // path = this.filePath.resolveNativePath('I think I should do something here'); this.file.writeFile(path, 'file.txt', content) .then(_ => alert('success')) .catch( err => alert('err : '+ err)); }
I know this is very basic question, but I’m wandering.
Posts: 1
Participants: 1