Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
1f6d349e
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
提交
1f6d349e
编写于
8月 29, 2023
作者:
张
张文迪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix volume and storage api docs
Signed-off-by:
N
张文迪
<
zhangwendi3@huawei.com
>
上级
dd98afca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
143 addition
and
41 deletion
+143
-41
zh-cn/application-dev/reference/apis/js-apis-file-storage-statistics.md
...ion-dev/reference/apis/js-apis-file-storage-statistics.md
+103
-24
zh-cn/application-dev/reference/apis/js-apis-file-volumemanager.md
...lication-dev/reference/apis/js-apis-file-volumemanager.md
+17
-17
zh-cn/release-notes/changelogs/OpenHarmony_4.0.10.5/changelogs-file-management.md
...gelogs/OpenHarmony_4.0.10.5/changelogs-file-management.md
+23
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-file-storage-statistics.md
浏览文件 @
1f6d349e
...
@@ -47,7 +47,7 @@ getTotalSizeOfVolume(volumeUuid: string): Promise<number>
...
@@ -47,7 +47,7 @@ getTotalSizeOfVolume(volumeUuid: string): Promise<number>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -90,7 +90,7 @@ getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback<number>):
...
@@ -90,7 +90,7 @@ getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback<number>):
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -137,7 +137,7 @@ getFreeSizeOfVolume(volumeUuid: string): Promise<number>
...
@@ -137,7 +137,7 @@ getFreeSizeOfVolume(volumeUuid: string): Promise<number>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -181,7 +181,7 @@ getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback<number>):
...
@@ -181,7 +181,7 @@ getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback<number>):
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -228,7 +228,7 @@ getBundleStats(packageName: string): Promise<BundleStats>
...
@@ -228,7 +228,7 @@ getBundleStats(packageName: string): Promise<BundleStats>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -271,7 +271,7 @@ getBundleStats(packageName: string, callback: AsyncCallback<BundleStats>)
...
@@ -271,7 +271,7 @@ getBundleStats(packageName: string, callback: AsyncCallback<BundleStats>)
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -305,13 +305,16 @@ getCurrentBundleStats(): Promise<BundleStats>
...
@@ -305,13 +305,16 @@ getCurrentBundleStats(): Promise<BundleStats>
| -------- | -------- |
| -------- | -------- |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
```
js
```
js
let
bundleStats
=
storageStatistics
.
getCurrentBundleStats
();
storageStatistics
.
getCurrentBundleStats
().
then
(
function
(
BundleStats
){
console
.
info
(
"
getCurrentBundleStats successfully:
"
+
JSON
.
stringify
(
bundleStats
));
console
.
info
(
"
getCurrentBundleStats successfully:
"
+
JSON
.
stringify
(
BundleStats
));
}).
catch
(
function
(
err
){
console
.
info
(
"
getCurrentBundleStats failed with error:
"
+
err
);
});
```
```
## storageStatistics.getCurrentBundleStats<sup>9+</sup>
## storageStatistics.getCurrentBundleStats<sup>9+</sup>
...
@@ -336,7 +339,7 @@ getCurrentBundleStats(callback: AsyncCallback<BundleStats>): void
...
@@ -336,7 +339,7 @@ getCurrentBundleStats(callback: AsyncCallback<BundleStats>): void
| -------- | -------- |
| -------- | -------- |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -385,13 +388,16 @@ getTotalSize(): Promise<number>
...
@@ -385,13 +388,16 @@ getTotalSize(): Promise<number>
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
```
js
```
js
let
number
=
storageStatistics
.
getTotalSize
();
storageStatistics
.
getTotalSize
().
then
(
function
(
number
){
console
.
info
(
"
getTotalSize successfully:
"
+
JSON
.
stringify
(
number
));
console
.
info
(
"
getTotalSize successfully:
"
+
JSON
.
stringify
(
number
));
}).
catch
(
function
(
err
){
console
.
info
(
"
getTotalSize failed with error:
"
+
err
);
});
```
```
## storageStatistics.getTotalSize<sup>9+</sup>
## storageStatistics.getTotalSize<sup>9+</sup>
...
@@ -422,7 +428,7 @@ getTotalSize(callback: AsyncCallback<number>): void
...
@@ -422,7 +428,7 @@ getTotalSize(callback: AsyncCallback<number>): void
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -433,6 +439,41 @@ getTotalSize(callback: AsyncCallback<number>): void
...
@@ -433,6 +439,41 @@ getTotalSize(callback: AsyncCallback<number>): void
});
});
```
```
## storageStatistics.getTotalSizeSync<sup>10+</sup>
getTotalSizeSync(): number
同步获取内置存储的总空间大小(单位为Byte)。
**需要权限**
:ohos.permission.STORAGE_MANAGER
**系统能力**
:SystemCapability.FileManagement.StorageService.SpatialStatistics
**系统接口:**
该接口为系统接口。
**错误码:**
以下错误码的详细介绍请参见
[
文件管理错误码
](
../errorcodes/errorcode-filemanagement.md
)
。
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permission verification failed. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13900042 | Unknown error. |
**示例:**
```
js
try
{
let
number
=
storageStatistics
.
getTotalSizeSync
();
console
.
info
(
"
getTotalSizeSync successfully:
"
+
JSON
.
stringify
(
number
));
}
catch
(
err
)
{
console
.
info
(
"
getTotalSizeSync failed with error:
"
+
err
);
}
```
## storageStatistics.getFreeSize<sup>9+</sup>
## storageStatistics.getFreeSize<sup>9+</sup>
getFreeSize(): Promise
<
number
>
getFreeSize(): Promise
<
number
>
...
@@ -461,13 +502,16 @@ getFreeSize(): Promise<number>
...
@@ -461,13 +502,16 @@ getFreeSize(): Promise<number>
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
```
js
```
js
let
number
=
storageStatistics
.
getFreeSize
();
storageStatistics
.
getFreeSize
().
then
(
function
(
number
){
console
.
info
(
"
getFreeSize successfully:
"
+
JSON
.
stringify
(
number
));
console
.
info
(
"
getFreeSize successfully:
"
+
JSON
.
stringify
(
number
));
}).
catch
(
function
(
err
){
console
.
info
(
"
getFreeSize failed with error:
"
+
err
);
});
```
```
## storageStatistics.getFreeSize<sup>9+</sup>
## storageStatistics.getFreeSize<sup>9+</sup>
...
@@ -498,7 +542,7 @@ getFreeSize(callback: AsyncCallback<number>): void
...
@@ -498,7 +542,7 @@ getFreeSize(callback: AsyncCallback<number>): void
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -509,6 +553,41 @@ getFreeSize(callback: AsyncCallback<number>): void
...
@@ -509,6 +553,41 @@ getFreeSize(callback: AsyncCallback<number>): void
});
});
```
```
## storageStatistics.getFreeSizeSync<sup>10+</sup>
getFreeSizeSync(): number
同步获取内置存储的可用空间大小(单位为Byte)。
**需要权限**
:ohos.permission.STORAGE_MANAGER
**系统能力**
:SystemCapability.FileManagement.StorageService.SpatialStatistics
**系统接口:**
该接口为系统接口。
**错误码:**
以下错误码的详细介绍请参见
[
文件管理错误码
](
../errorcodes/errorcode-filemanagement.md
)
。
| 错误码ID | 错误信息 |
| -------- | -------- |
| 201 | Permission verification failed. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13900042 | Unknown error. |
**示例:**
```
js
try
{
let
number
=
storageStatistics
.
getFreeSizeSync
();
console
.
info
(
"
getFreeSizeSync successfully:
"
+
JSON
.
stringify
(
number
));
}
catch
(
err
)
{
console
.
info
(
"
getFreeSizeSync failed with error:
"
+
err
);
}
```
## storageStatistics.getSystemSize<sup>9+</sup>
## storageStatistics.getSystemSize<sup>9+</sup>
getSystemSize(): Promise
<
number
>
getSystemSize(): Promise
<
number
>
...
@@ -537,7 +616,7 @@ getSystemSize(): Promise<number>
...
@@ -537,7 +616,7 @@ getSystemSize(): Promise<number>
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -577,7 +656,7 @@ getSystemSize(callback: AsyncCallback<number>): void
...
@@ -577,7 +656,7 @@ getSystemSize(callback: AsyncCallback<number>): void
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -616,7 +695,7 @@ getUserStorageStats(): Promise<StorageStats>
...
@@ -616,7 +695,7 @@ getUserStorageStats(): Promise<StorageStats>
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -656,7 +735,7 @@ getUserStorageStats(callback: AsyncCallback<StorageStats>): void
...
@@ -656,7 +735,7 @@ getUserStorageStats(callback: AsyncCallback<StorageStats>): void
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -702,7 +781,7 @@ getUserStorageStats(userId: number): Promise<StorageStats>
...
@@ -702,7 +781,7 @@ getUserStorageStats(userId: number): Promise<StorageStats>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600009 | User if out of range. |
| 13600009 | User if out of range. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -745,7 +824,7 @@ getUserStorageStats(userId: number, callback: AsyncCallback<StorageStats>)
...
@@ -745,7 +824,7 @@ getUserStorageStats(userId: number, callback: AsyncCallback<StorageStats>)
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600009 | User if out of range. |
| 13600009 | User if out of range. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
...
zh-cn/application-dev/reference/apis/js-apis-file-volumemanager.md
浏览文件 @
1f6d349e
...
@@ -39,7 +39,7 @@ getAllVolumes(): Promise<Array<Volume>>
...
@@ -39,7 +39,7 @@ getAllVolumes(): Promise<Array<Volume>>
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -77,7 +77,7 @@ getAllVolumes(callback: AsyncCallback<Array<Volume>>): void
...
@@ -77,7 +77,7 @@ getAllVolumes(callback: AsyncCallback<Array<Volume>>): void
| 202 | The caller is not a system application. |
| 202 | The caller is not a system application. |
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -124,7 +124,7 @@ mount(volumeId: string): Promise<void>
...
@@ -124,7 +124,7 @@ mount(volumeId: string): Promise<void>
| 13600003 | Failed to mount. |
| 13600003 | Failed to mount. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -168,7 +168,7 @@ mount(volumeId: string, callback:AsyncCallback<void>):void
...
@@ -168,7 +168,7 @@ mount(volumeId: string, callback:AsyncCallback<void>):void
| 13600003 | Failed to mount. |
| 13600003 | Failed to mount. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -215,7 +215,7 @@ unmount(volumeId: string): Promise<void>
...
@@ -215,7 +215,7 @@ unmount(volumeId: string): Promise<void>
| 13600004 | Failed to unmount. |
| 13600004 | Failed to unmount. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -259,7 +259,7 @@ unmount(volumeId: string, callback: AsyncCallback<void>): void
...
@@ -259,7 +259,7 @@ unmount(volumeId: string, callback: AsyncCallback<void>): void
| 13600004 | Failed to unmount. |
| 13600004 | Failed to unmount. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -303,7 +303,7 @@ getVolumeByUuid(uuid: string): Promise<Volume>
...
@@ -303,7 +303,7 @@ getVolumeByUuid(uuid: string): Promise<Volume>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -344,7 +344,7 @@ getVolumeByUuid(uuid: string, callback: AsyncCallback<Volume>): void
...
@@ -344,7 +344,7 @@ getVolumeByUuid(uuid: string, callback: AsyncCallback<Volume>): void
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -388,7 +388,7 @@ getVolumeById(volumeId: string): Promise<Volume>
...
@@ -388,7 +388,7 @@ getVolumeById(volumeId: string): Promise<Volume>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -429,7 +429,7 @@ getVolumeById(volumeId: string, callback: AsyncCallback<Volume>): void
...
@@ -429,7 +429,7 @@ getVolumeById(volumeId: string, callback: AsyncCallback<Volume>): void
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -476,7 +476,7 @@ setVolumeDescription(uuid: string, description: string): Promise<void>
...
@@ -476,7 +476,7 @@ setVolumeDescription(uuid: string, description: string): Promise<void>
| 13600002 | Not supported filesystem. |
| 13600002 | Not supported filesystem. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -521,7 +521,7 @@ setVolumeDescription(uuid: string, description: string, callback: AsyncCallback&
...
@@ -521,7 +521,7 @@ setVolumeDescription(uuid: string, description: string, callback: AsyncCallback&
| 13600002 | Not supported filesystem. |
| 13600002 | Not supported filesystem. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -569,7 +569,7 @@ format(volumeId: string, fsType: string): Promise<void>
...
@@ -569,7 +569,7 @@ format(volumeId: string, fsType: string): Promise<void>
| 13600002 | Not supported filesystem. |
| 13600002 | Not supported filesystem. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -614,7 +614,7 @@ format(volumeId: string, fsType: string, callback: AsyncCallback<void>): v
...
@@ -614,7 +614,7 @@ format(volumeId: string, fsType: string, callback: AsyncCallback<void>): v
| 13600002 | Not supported filesystem. |
| 13600002 | Not supported filesystem. |
| 13600005 | Incorrect volume state. |
| 13600005 | Incorrect volume state. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -660,7 +660,7 @@ partition(diskId: string, type: number): Promise<void>
...
@@ -660,7 +660,7 @@ partition(diskId: string, type: number): Promise<void>
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -703,7 +703,7 @@ partition(diskId: string, type: number, callback: AsyncCallback<void>): vo
...
@@ -703,7 +703,7 @@ partition(diskId: string, type: number, callback: AsyncCallback<void>): vo
| 401 | The input parameter is invalid. |
| 401 | The input parameter is invalid. |
| 13600001 | IPC error. |
| 13600001 | IPC error. |
| 13600008 | No such object. |
| 13600008 | No such object. |
| 139000
3
2 | Unknown error. |
| 139000
4
2 | Unknown error. |
**示例:**
**示例:**
...
@@ -729,4 +729,4 @@ partition(diskId: string, type: number, callback: AsyncCallback<void>): vo
...
@@ -729,4 +729,4 @@ partition(diskId: string, type: number, callback: AsyncCallback<void>): vo
| description | string | 是 | 否 | 卷设备描述。 |
| description | string | 是 | 否 | 卷设备描述。 |
| removable | boolean | 是 | 否 | 表示卷设备是否可移除,当前仅支持可移除存储设备。 |
| removable | boolean | 是 | 否 | 表示卷设备是否可移除,当前仅支持可移除存储设备。 |
| state | number | 是 | 否 | 卷设备状态标识:
<br>
0:卸载状态 UNMOUNTED
<br>
1:检查状态 CHECKING
<br>
2:挂载状态 MOUNTED
<br>
3:正在弹出状态 EJECTING |
| state | number | 是 | 否 | 卷设备状态标识:
<br>
0:卸载状态 UNMOUNTED
<br>
1:检查状态 CHECKING
<br>
2:挂载状态 MOUNTED
<br>
3:正在弹出状态 EJECTING |
| path | string | 是 | 否 | 卷设备的挂载地址,一般为/mnt/external/{uuid} |
| path | string | 是 | 否 | 卷设备的挂载地址,一般为/mnt/data/external/{uuid} |
\ No newline at end of file
\ No newline at end of file
zh-cn/release-notes/changelogs/OpenHarmony_4.0.10.5/changelogs-file-management.md
0 → 100644
浏览文件 @
1f6d349e
# 文件子系统ChangeLog
## cl.file.1 @ohos.file.storageStatistics和@ohos.file.volumeManager 文档错误码变更
[
@ohos.file.storageStatistics
](
../../../application-dev/reference/apis/js-apis-file-storage-statistics.md#
)
和
[
@ohos.file.volumeManager
](
../../../application-dev/reference/apis/js-apis-file-volumemanager.md#
)
两个模块中所有接口Unknown error错误码变更, d.ts中记录的错误码与实际功能代码中返回的不相符。
变更前每个接口Unknown error的错误码为13900032。
变更后每个接口Unknown error的错误码为13900042。
**变更影响**
功能代码中,针对“Unknown error”从首版本开始一直返回13900042,仅接口定义d.ts文件与API文档记录错误。
对原来的“13900032 Unknown error”进行了特殊处理的应用,需要进行排查,并修改为139000342。
**关键接口/组件变更**
涉及@ohos.file.storageStatistics模块和@ohos.file.volumemanager模块中的所有接口。
**适配指导**
针对Unknown error进行特殊处理的应用需要将错误码更改为13900042。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录