React Native - 访问(读取)设备文件和目录的名称和内容(如“下载”目录)

时间:2021-02-04 10:50:43

标签: android react-native react-native-android react-native-fs

我已经尝试过 react-native-fs 但是当我尝试下面的代码时我得到 Error: Attempt to get length of null array

RNFS.readDir(
    RNFS.DownloadDirectoryPath
).then(res => console.log(res))

或者我应该使用原生 android 代码?

0 个答案:

没有答案