Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
66feac1c
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
66feac1c
编写于
10月 28, 2022
作者:
Z
zhuhongtao666
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fileio_fix_options
Signed-off-by:
N
zhuhongtao666
<
zhuhongtao12@huawei.com
>
上级
1eae1643
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
81 deletion
+15
-81
zh-cn/application-dev/reference/apis/js-apis-fileio.md
zh-cn/application-dev/reference/apis/js-apis-fileio.md
+15
-81
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-fileio.md
浏览文件 @
66feac1c
...
...
@@ -655,11 +655,7 @@ openSync(path: string, flags?: number, mode?: number): number
## fileio.read
read(fd: number, buffer: ArrayBuffer, options?: {
offset?: number;
length?: number;
position?: number;
}): Promise
<
ReadOut
>
read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }): Promise
<
ReadOut
>
从文件读取数据,使用Promise异步回调。
...
...
@@ -696,11 +692,7 @@ read(fd: number, buffer: ArrayBuffer, options?: {
## fileio.read
read(fd: number, buffer: ArrayBuffer, options: {
offset?: number;
length?: number;
position?: number;
}, callback: AsyncCallback
<
ReadOut
>
): void
read(fd: number, buffer: ArrayBuffer, options: { offset?: number; length?: number; position?: number; }, callback: AsyncCallback
<
ReadOut
>
): void
从文件读取数据,使用callback异步回调。
...
...
@@ -732,11 +724,7 @@ read(fd: number, buffer: ArrayBuffer, options: {
## fileio.readSync
readSync(fd: number, buffer: ArrayBuffer, options?: {
offset?: number;
length?: number;
position?: number;
}): number
readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: number; length?: number; position?: number; }): number
以同步方法从文件读取数据。
...
...
@@ -927,12 +915,7 @@ unlinkSync(path: string): void
## fileio.write
write(fd: number, buffer: ArrayBuffer | string, options?: {
offset?: number;
length?: number;
position?: number;
encoding?: string;
}): Promise
<
number
>
write(fd: number, buffer: ArrayBuffer | string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): Promise
<
number
>
将数据写入文件,使用Promise异步回调。
...
...
@@ -967,12 +950,7 @@ write(fd: number, buffer: ArrayBuffer | string, options?: {
## fileio.write
write(fd: number, buffer: ArrayBuffer | string, options: {
offset?: number;
length?: number;
position?: number;
encoding?: string;
}, callback: AsyncCallback
<
number
>
): void
write(fd: number, buffer: ArrayBuffer | string, options: { offset?: number; length?: number; position?: number; encoding?: string; }, callback: AsyncCallback
<
number
>
): void
将数据写入文件,使用callback异步回调。
...
...
@@ -1002,12 +980,7 @@ write(fd: number, buffer: ArrayBuffer | string, options: {
## fileio.writeSync
writeSync(fd: number, buffer: ArrayBuffer | string, options?: {
offset?: number;
length?: number;
position?: number;
encoding?: string;
}): number
writeSync(fd: number, buffer: ArrayBuffer | string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): number
以同步方法将数据写入文件。
...
...
@@ -1441,11 +1414,7 @@ truncateSync(path: string, len?: number): void
## fileio.readText<sup>7+</sup>
readText(filePath: string, options?: {
position?: number;
length?: number;
encoding?: string;
}): Promise
<
string
>
readText(filePath: string, options?: { position?: number; length?: number; encoding?: string; }): Promise
<
string
>
基于文本方式读取文件(即直接读取文件的文本内容),使用Promise异步回调。
...
...
@@ -1478,11 +1447,7 @@ readText(filePath: string, options?: {
## fileio.readText<sup>7+</sup>
readText(filePath: string, options: {
position?: number;
length?: number;
encoding?: string;
}, callback: AsyncCallback
<
string
>
): void
readText(filePath: string, options: { position?: number; length?: number; encoding?: string; }, callback: AsyncCallback
<
string
>
): void
基于文本方式读取文件(即直接读取文件的文本内容),使用callback异步回调。
...
...
@@ -1508,11 +1473,7 @@ readText(filePath: string, options: {
## fileio.readTextSync<sup>7+</sup>
readTextSync(filePath: string, options?: {
position?: number;
length?: number;
encoding?: string;
}): string
readTextSync(filePath: string, options?: { position?: number; length?: number; encoding?: string; }): string
以同步方法基于文本方式读取文件(即直接读取文件的文本内容)。
...
...
@@ -2995,12 +2956,7 @@ flushSync(): void
### write<sup>7+</sup>
write(buffer: ArrayBuffer | string, options?: {
offset?: number;
length?: number;
position?: number;
encoding?: string;
}): Promise
<
number
>
write(buffer: ArrayBuffer | string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): Promise
<
number
>
将数据写入流文件,使用Promise异步回调。
...
...
@@ -3034,12 +2990,7 @@ write(buffer: ArrayBuffer | string, options?: {
### write<sup>7+</sup>
write(buffer: ArrayBuffer | string, options: {
offset?: number;
length?: number;
position?: number;
encoding?: string;
}, callback: AsyncCallback
<
number
>
): void
write(buffer: ArrayBuffer | string, options: { offset?: number; length?: number; position?: number; encoding?: string; }, callback: AsyncCallback
<
number
>
): void
将数据写入流文件,使用callback异步回调。
...
...
@@ -3069,12 +3020,7 @@ write(buffer: ArrayBuffer | string, options: {
### writeSync<sup>7+</sup>
writeSync(buffer: ArrayBuffer | string, options?: {
offset?: number;
length?: number;
position?: number;
encoding?: string;
}): number
writeSync(buffer: ArrayBuffer | string, options?: { offset?: number; length?: number; position?: number; encoding?: string; }): number
以同步方法将数据写入流文件。
...
...
@@ -3104,11 +3050,7 @@ writeSync(buffer: ArrayBuffer | string, options?: {
### read<sup>7+</sup>
read(buffer: ArrayBuffer, options?: {
position?: number;
offset?: number;
length?: number;
}): Promise
<
ReadOut
>
read(buffer: ArrayBuffer, options?: { position?: number; offset?: number; length?: number; }): Promise
<
ReadOut
>
从流文件读取数据,使用Promise异步回调。
...
...
@@ -3143,11 +3085,7 @@ read(buffer: ArrayBuffer, options?: {
### read<sup>7+</sup>
read(buffer: ArrayBuffer, options: {
position?: number;
offset?: number;
length?: number;
}, callback: AsyncCallback
<
ReadOut
>
): void
read(buffer: ArrayBuffer, options: { position?: number; offset?: number; length?: number; }, callback: AsyncCallback
<
ReadOut
>
): void
从流文件读取数据,使用callback异步回调。
...
...
@@ -3177,11 +3115,7 @@ read(buffer: ArrayBuffer, options: {
### readSync<sup>7+</sup>
readSync(buffer: ArrayBuffer, options?: {
position?: number;
offset?: number;
length?: number;
}): number
readSync(buffer: ArrayBuffer, options?: { position?: number; offset?: number; length?: number; }): number
以同步方法从流文件读取数据。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录