我已经实现了以下代码:
- 使用RNFS.downloadFile()下载zip文件
- 使用ZipArchive.unzip()解压缩文件
- 使用RNFS.unlink()删除zip文件
if (free_space_on_device > zip_size + unpacked_size){
proceed with steps 1 through 3 (listed above)
}
RNFS.getFSInfo
不需要参数: https://github.com/itinance/react-native-fs#getfsinfo-promisefsinforesult 看起来它只返回主存储的信息。 - Marc_Alx