Unable to create a file using `expo-file-system`

The following function…

import * as fs from 'expo-file-system'

async function onSaveClick() {
  await fs.writeAsStringAsync(fs.documentDirectory + 'save.json', 'TEST SAVE CONTENT')
  console.log(fs.documentDirectory) // LOG  file:///data/user/0/host.exp.exponent/files/

… does not create a file. I tried running this app on an actual android device and on an emulator too, did not work in both.

Thank you in advance

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.