Hello
We need to create text file from string content, When I a trying to create just directory then I am getting an error like “Directory ‘file:///…/myfolder’ could not be created”
I have also tried after giving read and wrote external storage permission but didn’t get any success.
Can you please guide us on this. As our aim is attaching that file in email, but for that first we need to create file and directory.
We are using Expo’s FileSystem.
Our Code as below
try {
let folder = FileSystem.documentDirectory + "mailToStory"
await FileSystem.makeDirectoryAsync(folder, {
intermediates: true
})
var fi = await FileSystem.getInfoAsync(folder);
alert(JSON.stringify(fi))
} catch (error) {
alert(error)
}
Waiting for your answer.