• Home
Name Date Size #Lines LOC

..--

interfaces/kits/js/12-May-2024-310228

BUILD.gnD12-May-2024746 1816

LICENSED12-May-20249.9 KiB177150

OAT.xmlD12-May-20243.8 KiB6610

README.mdD12-May-2024960 3725

README_ZH.mdD12-May-20241.2 KiB3428

bundle.jsonD12-May-2024822 3130

README.md

1# app_file_service
2
3#### Description
4{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
5
6#### Software Architecture
7Software architecture description
8
9#### Installation
10
111.  xxxx
122.  xxxx
133.  xxxx
14
15#### Instructions
16
171.  xxxx
182.  xxxx
193.  xxxx
20
21#### Contribution
22
231.  Fork the repository
242.  Create Feat_xxx branch
253.  Commit your code
264.  Create Pull Request
27
28
29#### Gitee Feature
30
311.  You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
322.  Gitee blog [blog.gitee.com](https://blog.gitee.com)
333.  Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
344.  The most valuable open source project [GVP](https://gitee.com/gvp)
355.  The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
366.  The most popular members  [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
37

README_ZH.md

1# 应用文件服务
2
3## **简介**
4应用文件服务是为应用提供文件分享和管理能力的服务,包含应用间文件分享、跨设备同应用文件分享以及跨设备跨应用文件分享的能力。
5当前已具备基于分布式文件系统的跨设备同应用文件分享能力。
6
7## **目录**
8```
9/foundation/filemanagement/app_file_service
10├── interfaces                      // 对外接口
11│   └── kits                        // 对外接口代码
12```
13
14## **说明**
15### 接口说明
16**表1** 应用文件服务接口说明
17| **接口名** | **说明** |
18| --- | --- |
19| createSharePath(fd: number, cid: string, callback: AsyncCallback\<string>): void <br> createSharePath(fd: number, cid: string): Promise\<string> | 将文件fd与设备cid传递给分布式文件系统,创建跨设备分享路径 |
20### 使用说明
21createSharePath接口为分享文件fd创建能够跨设备访问的分布式路径,异步返回创建结果,设备号cid用于指定分享设备。
22
23示例:
24```
25import remotefileshare from '@ohos.remotefileshare'
26
27remotefileshare.createSharePath(fd, cid, function(err, path) {
28    // callback
29});
30
31remotefileshare.createSharePath(fd, cid).then(function(path) {
32    // promise
33});
34```