From 9e5cbcf1eecadf11e2d52909b3eaebc1d77aa786 Mon Sep 17 00:00:00 2001 From: zhengjinshou Date: Fri, 6 Dec 2024 11:19:13 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#IB9I1A]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20react-native-fs=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-fs.md | 239 +++++++++++++++++++++------------------ zh-cn/model-gitee.md | 16 +-- zh-cn/react-native-fs.md | 233 +++++++++++++++++++++----------------- 3 files changed, 270 insertions(+), 218 deletions(-) diff --git a/en/react-native-fs.md b/en/react-native-fs.md index 8325d474..d2f404a7 100644 --- a/en/react-native-fs.md +++ b/en/react-native-fs.md @@ -1,40 +1,31 @@ -> Template version: v0.2.2 +> Template version: v0.3.0

react-native-fs

-

- - Supported platforms - - - License - - -

- -> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-fs) +This project is based on [react-native-fs@2.20.0](https://github.com/itinance/react-native-fs)。 -## Installation and Usage +| Version | Package Name | Repository | Release | +| --------------------------- | ------------------------------------ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| <= 2.20.0-0.1.14@deprecated | @react-native-oh-tpl/react-native-fs | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-fs) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-fs/releases) | +| >= 2.20.1 | @react-native-ohos/react-native-fs | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-fs) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-fs/releases) | -Find the matching version information in the release address of a third-party library: [@react-native-oh-library/react-native-fs Releases](https://github.com/react-native-oh-library/react-native-fs/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +## 1. Installation and Usage Go to the project directory and execute the following instruction: - - #### npm ```bash -npm install @react-native-oh-tpl/react-native-fs +npm install @react-native-ohos/react-native-fs ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-fs +yarn add @react-native-ohos/react-native-fs ``` @@ -45,18 +36,10 @@ The following code shows the basic use scenario of the repository: ```tsx import React, { useState } from "react"; -import { - SafeAreaView, - StyleSheet, - ScrollView, - View, - Text, - StatusBar, - TextInput, - Button, -} from "react-native"; +import { SafeAreaView, StyleSheet, ScrollView, View, Text, StatusBar, TextInput, Button } from "react-native"; import FS from "react-native-fs"; import { Colors } from "react-native/Libraries/NewAppScreen"; + function App(): React.JSX.Element { const [mkdirParam, setMkdirParam] = useState(""); const mkdirExample = () => { @@ -75,13 +58,8 @@ function App(): React.JSX.Element { <> - - - {"React Native File Harmony Demo App"} - + + {"React Native File Harmony Demo App"} {"mkdir"} @@ -94,11 +72,7 @@ function App(): React.JSX.Element { autoCapitalize="none" /> -