admin管理员组

文章数量:1194605

I'm developing a file storage app that needs to read the contents of the sd-storage and internal phone storage. I've checked out react-native-fs and react-native-fetch-blob but both of these apps only allow me to access my app's storage. How can I read the other files present on the phone?

I'm developing a file storage app that needs to read the contents of the sd-storage and internal phone storage. I've checked out react-native-fs and react-native-fetch-blob but both of these apps only allow me to access my app's storage. How can I read the other files present on the phone?

Share Improve this question asked Feb 22, 2017 at 14:53 bkkbkk 4212 gold badges4 silver badges10 bronze badges 2
  • Have you found a solution for it ? I need to do the exact same thing on React native iOS – BaptWaels Commented Apr 11, 2017 at 9:10
  • Yes I did actually. By using react-native-fs which was recommended to me in the answer – bkk Commented Apr 12, 2017 at 9:57
Add a comment  | 

2 Answers 2

Reset to default 19

I believe react-native-fs does support external storage in Android.

From the documentation:

ExternalDirectoryPath (String) The absolute path to the external files, shared directory (android only)

ExternalStorageDirectoryPath (String) The absolute path to the external storage, shared directory (android only)

it does access the external storage you just need to ask for permission for external storage

本文标签: javascriptHow to access the file system in react nativeStack Overflow