In my app, i want user to choose file in memory, read content of this file as text and save it. So iam using FileChooser and FilePath plugin. Problem is that function for reading file in File plugin takes two parametres: directory path and file name. But from Filepath plugin i get only whole adress of the file. Are there any convinient functions to get path of directory and file name separately? Or do i have to go with splitting the whole string and then reconstruct the path from its parts?
openFile(){
this.fileChooser.open().then(uri=>{
console.log(uri);
this.filePath.resolveNativePath(uri).then((path)=>{
console.log(path);
this.file.readAsText(path,'testFile.txt').then((data)=>{
console.log(data);
}).catch(err=>console.log(err));
})
});
}