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
2 Answers
Reset to default 19I 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
版权声明:本文标题:javascript - How to access the file system in react native? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738445992a2087216.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论