提交 6124361e 编写于 作者: Z zhangxingxia

update fileio api

Signed-off-by: Nzhangxingxia <zhangxingxia1@huawei.com>
上级 c5345c22
......@@ -2966,6 +2966,40 @@ readSync(): Dirent
```
### close
close(): Promise&lt;void&gt;
异步关闭目录,使用promise形式返回结果。目录被关闭后,Dir中持有的文件描述将被释放,后续将无法从Dir中读取目录项。
**系统能力**:SystemCapability.FileManagement.File.FileIO
**示例:**
```js
let dir = fileio.opendirSync(path);
dir.close().then(function(err){
console.info("close dir successfully");
});
```
### close
close(callback: AsyncCallback&lt;void&gt;): void
异步关闭目录,使用callback形式返回结果。目录被关闭后,Dir中持有的文件描述将被释放,后续将无法从Dir中读取目录项。
**系统能力**:SystemCapability.FileManagement.File.FileIO
**示例:**
```js
let dir = fileio.opendirSync(path);
dir.close(function(err){
console.info("close dir successfully");
});
```
### closeSync
closeSync(): void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册