-
Notifications
You must be signed in to change notification settings - Fork 163
Description
I'm encountering an issue with the fs.exists function in ReactNativeBlobUtil. The code I'm using is:
const fileExist = await ReactNativeBlobUtil.fs.exists(path ?? '');
When the file is located in the cache folder, the function works correctly and returns true if the file exists. However, when the file is not in the cache folder and the path contains 'content', such as content://com.android.providers.downloads.documents/document/msf%3A1000000018, the function always returns false.
Reproduction Steps:
Use a file path containing 'content' (e.g., content://com.android.providers.downloads.documents/document/msf%3A1000000018).
Call ReactNativeBlobUtil.fs.exists(path).
Observe that the function returns false, even if the file exists.
Expected Behavior:
The fs.exists function should correctly identify the existence of a file, even when the path includes 'content://'.
Additional Context:
I found a potential solution in another package that handles similar paths. The relevant implementation can be seen in the react-native-file-viewer repository:
solution(see line 50).
Proposed Solution:
Could you integrate a similar approach to handle 'content://' paths in your library? This would greatly enhance the functionality and reliability of fs.exists and similar methods.
Environment:
React Native Version: 0.73.6
ReactNativeBlobUtil Version: 0.19.9
Platform: Android
Thank you for your attention to this issue.