I am trying to get a list of all files in the FilesystemDirectory.Data filesystem. Here is my code:
export const removeAllDataFiles = () => {
return Filesystem.readdir({
path: '',
directory: FilesystemDirectory.Data,
});
};
I get an error back: Error: Uncaught (in promise): Error: Folder does not exist.
If I set path
to '/'
or '.'
I still get the same error.
Is there any way to read all files in the Data
directory?