-
Notifications
You must be signed in to change notification settings - Fork 32
Description
react-native: 0.76.5
react-native-file-access: 3.1.1
Platform: Android
Bug
I used react-native-document-picker to select a specific directory. Then, I used react-native-file-access to scan all image files in the directory. However, when validating with FileSystem.exists, the result shows that the file does not exist.
To reproduce
const dir = await DocumentPicker.pickDirectory()
const files = await FileSystem.ls(dir);
const dirForFile = dir
for (const file of files) {
if (isImageFile(file)) {
const filePath = decodeURIComponent(${dirForFile}/${file});
const exist = await FileSystem.exists(filePath);
console.log("filePath", filePath, "exist", exist);
rootPages.push({ fileName: file, filePath });
}
}
Details
Logs, code snippets, screenshots, extended bug description.
