文档模板:v0.4.2
react-native-fs
本项目基于 react-native-fs 开发。
该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-fs,版本所属关系如下:
| 三方库名称 | 三方库版本(npm地址) | 发布信息 | 支持RN版本 | Autolink | 编译API版本 | 社区基线版本 | 源码地址 |
|---|---|---|---|---|---|---|---|
| @react-native-ohos/react-native-fs | ~ 2.22.0 | Gitcode Releases | 0.82.* | 是 | API12+ | 2.20.0 | br_rnoh0.82 |
| @react-native-ohos/react-native-fs | ~ 2.21.0 | Gitcode Releases | 0.77.* | 否 | API12+ | 2.20.0 | br_rnoh0.77 |
| @react-native-ohos/react-native-fs | ~ 2.20.1 | Gitcode Releases | 0.72.* | 是 | API12+ | 2.20.0 | br_rnoh0.72 |
| @react-native-oh-tpl/react-native-fs | <= 2.20.0-0.1.14@deprecated | Github Releases(deprecated) | 0.72.* | 否 | API12+ | 2.20.0 | sig |
简介
react-native-fs 是 React Native 的文件系统库,提供文件的读取、写入、追加、复制、移动、删除等操作,支持目录管理、文件下载与上传、文件哈希校验等功能,同时提供多种系统目录路径常量(如文档目录、缓存目录、临时目录等)。
下载安装
进入到工程目录并输入以下命令:
npm
npm install @react-native-ohos/react-native-fs
yarn
yarn add @react-native-ohos/react-native-fs