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

Cannot access to other folders by RNFS.exists()

Open gangli66 opened this issue 2 years ago • 0 comments

I use react-native-webview in my react-native-windows project. So when the webview is loaded, it downloads static contents from web server to local cache folders. But the webview cache folder is different from appx cache folder. When I use react-native-fs function RNFS.exists() to judge if the web cache folder (C:\Users\xxx\AppData\Local\Package\myproject\AC) exists, it catches an error that access denied. I found a solution from microsoft website: Adding

  1. xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities",
  2. IgnorableNamespaces="uap mp iot rescap"
  3. <rescap:Capability Name="broadFileSystemAccess" /> to Package.appxmanifest. But now the site http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities return error like The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. How should I do to access other folders by RNFS.exists()?

gangli66 avatar Sep 07 '22 09:09 gangli66