react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

Exist returns false on saved path if app was reopened [iOS]

Open ShevO27 opened this issue 3 years ago • 2 comments

React-native: 0.66.4 react-native-fs: ^2.18.0 Platform: iOS I've used react-native-document-picker in order to obtain a full path of a file that is picked and the path of that file is saved later in async storage. The path looks like this file:///private/var/mobile/Containers/Shared/AppGroup/1762B26C-CC73-47D9-9211-EC761FBCB678/File Provider Storage/Downloads/Docs.zip I check if that file exists via react-native-fs exist() method which works correctly, and returns true if app isn't reopened, it returns false otherwise. I have checked that file path doesn't change on app reopen, it remains the same. This only reproduces on iOS. After 'repicking' the file, it immediately works again. Is there any solution to this? Maybe i'm missing some permission-related stuff?

ShevO27 avatar Feb 01 '22 18:02 ShevO27

请问这个问题解决了吗? @Oleksii27

pengli2075 avatar Jul 19 '22 05:07 pengli2075

Maybe your issue is related to the space in your path https://stackoverflow.com/questions/53531734/cant-read-file-names-with-on-react-native

truongnv98 avatar Mar 11 '24 07:03 truongnv98