未验证 提交 063b7c8a 编写于 作者: O openharmony_ci 提交者: Gitee

!3854 #I5563I完成,请审批

Merge pull request !3854 from Annie_wang/PR3551
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> >
> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module are system APIs and cannot be called by third-party applications. > - API version 9 is a canary release for trial use. The APIs of this version may be unstable.
## Modules to Import ## Modules to Import
...@@ -15,7 +15,7 @@ import storagestatistics from "@ohos.storageStatistics"; ...@@ -15,7 +15,7 @@ import storagestatistics from "@ohos.storageStatistics";
getTotalSizeOfVolume(volumeUuid: string): Promise&lt;number&gt; getTotalSizeOfVolume(volumeUuid: string): Promise&lt;number&gt;
Asynchronously obtains the total space of the specified volume. This method uses a promise to return the result. Asynchronously obtains the total space of the specified volume. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics **System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
...@@ -46,7 +46,7 @@ Asynchronously obtains the total space of the specified volume. This method uses ...@@ -46,7 +46,7 @@ Asynchronously obtains the total space of the specified volume. This method uses
getTotalSizeOfVolume(volumeUuid: string, callback:AsyncCallback&lt;number&gt;):void getTotalSizeOfVolume(volumeUuid: string, callback:AsyncCallback&lt;number&gt;):void
Asynchronously obtains the total space of the specified volume. This method uses a callback to return the result. Asynchronously obtains the total space of the specified volume. This API uses a callback to return the result.
**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics **System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
...@@ -62,7 +62,7 @@ Asynchronously obtains the total space of the specified volume. This method uses ...@@ -62,7 +62,7 @@ Asynchronously obtains the total space of the specified volume. This method uses
```js ```js
let uuid = ""; let uuid = "";
storagestatistics.getTotalSizeOfVolume(uuid, function(error, number){ storagestatistics.getTotalSizeOfVolume(uuid, function(error, number){
// Do something // Do something.
console.info("getTotalSizeOfVolume successfully:"+ number); console.info("getTotalSizeOfVolume successfully:"+ number);
}); });
``` ```
...@@ -73,7 +73,7 @@ Asynchronously obtains the total space of the specified volume. This method uses ...@@ -73,7 +73,7 @@ Asynchronously obtains the total space of the specified volume. This method uses
getFreeSizeOfVolume(volumeUuid: string): Promise&lt;number&gt; getFreeSizeOfVolume(volumeUuid: string): Promise&lt;number&gt;
Asynchronously obtains the available space of the specified volume. This method uses a promise to return the result. Asynchronously obtains the available space of the specified volume. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics **System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
...@@ -105,7 +105,7 @@ Asynchronously obtains the available space of the specified volume. This method ...@@ -105,7 +105,7 @@ Asynchronously obtains the available space of the specified volume. This method
getFreeSizeOfVolume(volumeUuid: string, callback:AsyncCallback&lt;number&gt;):void getFreeSizeOfVolume(volumeUuid: string, callback:AsyncCallback&lt;number&gt;):void
Asynchronously obtains the available space of the specified volume. This method uses a callback to return the result. Asynchronously obtains the available space of the specified volume. This API uses a callback to return the result.
**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics **System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
...@@ -121,7 +121,7 @@ Asynchronously obtains the available space of the specified volume. This method ...@@ -121,7 +121,7 @@ Asynchronously obtains the available space of the specified volume. This method
```js ```js
let uuid = ""; let uuid = "";
storagestatistics.getFreeSizeOfVolume(uuid, function(error, number){ storagestatistics.getFreeSizeOfVolume(uuid, function(error, number){
// Do something // Do something.
console.info("getFreeSizeOfVolume successfully:"+ number); console.info("getFreeSizeOfVolume successfully:"+ number);
}); });
``` ```
...@@ -130,7 +130,7 @@ Asynchronously obtains the available space of the specified volume. This method ...@@ -130,7 +130,7 @@ Asynchronously obtains the available space of the specified volume. This method
getBundleStats(packageName: string): Promise&lt;BundleStats&gt; getBundleStats(packageName: string): Promise&lt;BundleStats&gt;
Obtains the bundle status. This method uses a promise to return the result. Asynchronously obtains app information. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics **System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
...@@ -144,7 +144,7 @@ Obtains the bundle status. This method uses a promise to return the result. ...@@ -144,7 +144,7 @@ Obtains the bundle status. This method uses a promise to return the result.
| Type | Description | | Type | Description |
| ------------------------------------------ | -------------------------- | | ------------------------------------------ | -------------------------- |
| Promise&lt;[Bundlestats](#bundlestats)&gt; | Promise used to return the bundle status on the volume.| | Promise&lt;[Bundlestats](#bundlestats)&gt; | Promise used to return the app information.|
- Example - Example
...@@ -161,7 +161,7 @@ Obtains the bundle status. This method uses a promise to return the result. ...@@ -161,7 +161,7 @@ Obtains the bundle status. This method uses a promise to return the result.
getBundleStats(packageName: string, callback: AsyncCallback&lt;BundleStats&gt;): void getBundleStats(packageName: string, callback: AsyncCallback&lt;BundleStats&gt;): void
Obtains the bundle status. This method uses an asynchronous callback to return the result. Asynchronously obtains app information. This API uses a callback to return the result.
**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics **System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
...@@ -170,14 +170,14 @@ Obtains the bundle status. This method uses an asynchronous callback to return t ...@@ -170,14 +170,14 @@ Obtains the bundle status. This method uses an asynchronous callback to return t
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------ | | -------- | --------------------------------------------------------- | ---- | ------------------------------------ |
| packageName | string | Yes | Bundle name of the app.| | packageName | string | Yes | Bundle name of the app.|
| callback | callback:AsyncCallback&lt;[Bundlestats](#bundlestats)&gt; | Yes | Callback invoked to return the bundle status on the volume.| | callback | callback:AsyncCallback&lt;[Bundlestats](#bundlestats)&gt; | Yes | Callback invoked to return the app information.|
- Example - Example
```js ```js
let packageName = ""; let packageName = "";
storagestatistics.getBundleStats(packageName, function(error, BundleStats){ storagestatistics.getBundleStats(packageName, function(error, BundleStats){
// Do something // Do something.
console.info("getBundleStats successfully:"+ JSON.stringify(BundleStats)); console.info("getBundleStats successfully:"+ JSON.stringify(BundleStats));
}); });
``` ```
...@@ -191,5 +191,5 @@ Obtains the bundle status. This method uses an asynchronous callback to return t ...@@ -191,5 +191,5 @@ Obtains the bundle status. This method uses an asynchronous callback to return t
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | -------------- | | --------- | ------ | -------------- |
| appSize<sup>9+</sup> | number | Size of the app. | | appSize<sup>9+</sup> | number | Size of the app. |
| cacheSize<sup>9+</sup> | number | Size of the cached data. | | cacheSize<sup>9+</sup> | number | Cache size of the app. |
| dataSize<sup>9+</sup> | number | Total data size of the app.| | dataSize<sup>9+</sup> | number | Total data size of the app.|
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> >
> - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > - The initial APIs of this module are supported since API version 9.
> - The APIs of this module are system APIs and cannot be called by third-party applications. > - API version 9 is a canary release for trial use. The APIs of this version may be unstable.
## Modules to Import ## Modules to Import
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册