You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 });
}
}
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 });
}
}
output:
Details
Logs, code snippets, screenshots, extended bug description.
The text was updated successfully, but these errors were encountered: