where is the actual file writeAsStringAsync will write?

I’m trying to write a string to a file like this:

filename = await FileSystem.documentDirectory + tempname + ".txt";
await FileSystem.writeAsStringAsync(filename, "hello world", { encoding: FileSystem.EncodingTypes.UTF8 });

but no files was found, and i need to use this to create a file

await MediaLibrary.createAssetAsync(`${FileSystem.documentDirectory}${tempname}.txt`);


after that, the file was appeared at document/DCIM/myfile.txt. But i know using createAssetAsync will create additional file.

I want to know where is the actual file writeAsStringAsync will write? I use getInfoAsync to show the file was in


file:///data/user/0/host.exp.exponent/files/ExperienceData/%2540hkvega01%252Fstocktake-file-builder/456-2019-2-12.txt"

but i didn’t find this path.

1 Like

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