可以参考一下如下demo,这个是fs的path<View style={{ padding: 20 }}> <View> <Text style={{fontSize:13,color:"red"}}> 当前库为文件操作库 不存在页面效果请关注文件系统变更{"\n"} 相关资料链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/app-sandbox-directory-0000001774280086 </Text> </View> <View style={styles.sectionDescription}> <Text>FS.DocumentDirectoryPath:{"\n"}{RNFS.DocumentDirectoryPath}</Text> </View> <View style={styles.sectionDescription}> <Text>FS.CachesDirectoryPath:{RNFS.CachesDirectoryPath}</Text> </View> <View style={styles.sectionDescription}> <Text>FS.MainBundlePath:{"\n"}{RNFS.MainBundlePath}</Text> </View> <View style={styles.sectionDescription}> <Text>FS.TemporaryDirectoryPath:{"\n"}{RNFS.TemporaryDirectoryPath}</Text> </View> <View style={styles.sectionDescription}> <Text>FS.LibraryDirectoryPath:{"\n"}{RNFS.LibraryDirectoryPath}</Text> </View> </View>
可以参考一下如下demo,这个是fs的path