diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md index a14539f8a0dd6d6c4d7b18146ecaf0d95387002e..0887ba201b14be493ae22929539fa98aef908bc2 100644 --- a/en/application-dev/reference/apis/Readme-EN.md +++ b/en/application-dev/reference/apis/Readme-EN.md @@ -36,7 +36,6 @@ - [Environment](js-apis-environment.md) - [Public File Access and Management](js-apis-filemanager.md) - [App Storage Statistics](js-apis-storage-statistics.md) - - [Volume Management](js-apis-volumemanager.md) - Account Management - [OS Account Management](js-apis-osAccount.md) - [Distributed Account Management](js-apis-distributed-account.md) diff --git a/en/application-dev/reference/apis/js-apis-storage-statistics.md b/en/application-dev/reference/apis/js-apis-storage-statistics.md index cf3f8347a415bde8aa969e6d9585d8d3f69dd643..66b51201e3e42e7c852b7f372c4d392ed543ea29 100644 --- a/en/application-dev/reference/apis/js-apis-storage-statistics.md +++ b/en/application-dev/reference/apis/js-apis-storage-statistics.md @@ -126,70 +126,3 @@ Asynchronously obtains the available space of the specified volume. This method }); ``` -## storagestatistics.getBundleStats - -getBundleStats(packageName: string): Promise<BundleStats> - -Obtains the bundle status. This method uses a promise to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics - -- Parameters - - | Name | Type | Mandatory| Description | - | ----------- | ------ | ---- | -------- | - | packageName | string | Yes | Bundle name of the app.| - -- Return value - - | Type | Description | - | ------------------------------------------ | -------------------------- | - | Promise<[Bundlestats](#bundlestats)> | Promise used to return the bundle status on the volume.| - -- Example - - ```js - let packageName = ""; - storagestatistics.getBundleStats(packageName).then(function(BundleStats){ - console.info("getBundleStats successfully:"+ JSON.stringify(BundleStats)); - }).catch(function(err){ - console.info("getBundleStats failed with error:"+ err); - }); - ``` - -## storagestatistics.getBundleStats - -getBundleStats(packageName: string, callback: AsyncCallback<BundleStats>): void - -Obtains the bundle status. This method uses an asynchronous callback to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics - -- Parameters - - | Name | Type | Mandatory| Description | - | -------- | --------------------------------------------------------- | ---- | ------------------------------------ | - | packageName | string | Yes | Bundle name of the app.| - | callback | callback:AsyncCallback<[Bundlestats](#bundlestats)> | Yes | Callback invoked to return the bundle status on the volume.| - -- Example - - ```js - let packageName = ""; - storagestatistics.getBundleStats(packageName, function(error, BundleStats){ - // Do something - console.info("getBundleStats successfully:"+ JSON.stringify(BundleStats)); - }); - ``` - -## BundleStats9+ - -**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics - -### Attributes - -| Name | Type | Description | -| --------- | ------ | -------------- | -| appSize9+ | number | Size of the app. | -| cacheSize9+ | number | Size of the cached data. | -| dataSize9+ | number | Total data size of the app.| diff --git a/en/application-dev/reference/apis/js-apis-volumemanager.md b/en/application-dev/reference/apis/js-apis-volumemanager.md deleted file mode 100644 index 0b5491d66aad03a77512c492f96b31f264b05da5..0000000000000000000000000000000000000000 --- a/en/application-dev/reference/apis/js-apis-volumemanager.md +++ /dev/null @@ -1,179 +0,0 @@ -# Volume Management - -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
-> -> - 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. -> - This is a system API and cannot be called by third-party applications. - -## Modules to Import - -```js -import volumemanager from "@ohos.volumeManager"; -``` - -## volumemanager.getAllVolumes9+ - -getAllVolumes(): Promise<Array<Volume>> - -Asynchronously obtains information about all available volumes. This method uses a promise to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -- Return value - - | Type | Description | - | ---------------------------------- | -------------------------- | - | Promise<[Volume](#volume)[]> | Promise used to return the execution result.| - -- Example - - ```js - volumemanager.getAllVolumes().then(function(volumes){ - // do something - }); - ``` - -## volumemanager.getAllVolumes9+ - -getAllVolumes(callback: AsyncCallback<Array<Volume>>): void - -Asynchronously obtains information about all available volumes. This method uses a callback to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -- Parameters - - | Name | Type | Mandatory| Description | - | -------- | ------------------------------------------------- | ---- | ------------------------------------ | - | callback | callback:AsyncCallback<[Volume](#volume)[]> | Yes | Callback invoked to return the volume information obtained.| - -- Example - - ```js - let uuid = ""; - volumemanager.getAllVolumes(uuid, function(error, volumes){ - // do something - }); - ``` - - -## volumemanager.mount9+ - -mount(volumeId: string): Promise<boolean> - -Asynchronously mounts a volume. This method uses a promise to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -- Parameters - - | Name | Type | Mandatory| Description| - | -------- | ------ | ---- | ---- | - | volumeId | string | Yes | Volume ID.| - -- Return value - - | Type | Description | - | ---------------------- | ---------- | - | Promise<boolean> | Promise used to return the execution result.| - -- Example - - ```js - let volumeId = ""; - volumemanager.mount(volumeId).then(function(flag){ - // do something - }); - ``` - -## volumemanager.mount9+ - -mount(volumeId: string, callback:AsyncCallback<boolean>):void - -Asynchronously obtains the available space of the specified volume. This method uses a callback to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -- Parameters - - | Name | Type | Mandatory| Description | - | -------- | ------------------------------------- | ---- | -------------------- | - | volumeId | string | Yes | Volume ID. | - | callback | callback:AsyncCallback<boolean> | Yes | Callback invoked to return the execution result.| - -- Example - - ```js - let volumeId = ""; - volumemanager.mount(volumeId, function(error, flag){ - // do something - }); - ``` - -## volumemanager.unmount9+ - -unmount(volumeId: string): Promise<boolean> - -Asynchronously unmounts a volume. This method uses a promise to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -- Parameters - - | Name | Type | Mandatory| Description| - | -------- | ------ | ---- | ---- | - | volumeId | string | Yes | Volume ID.| - -- Return value - - | Type | Description | - | ---------------------- | ---------- | - | Promise<boolean> | Promise used to return the execution result.| - -- Example - - ```js - let volumeId = ""; - volumemanager.unmount(volumeId).then(function(flag){ - // do something - }); - ``` - -## volumemanager.unmount9+ - -unmount(volumeId: string, callback:AsyncCallback<boolean>):void - -Asynchronously unmounts a volume. This method uses a callback to return the result. - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -- Parameters - - | Name | Type | Mandatory| Description | - | -------- | ------------------------------------- | ---- | -------------------- | - | volumeId | string | Yes | Volume ID. | - | callback | callback:AsyncCallback<boolean> | Yes | Callback invoked to return the execution result.| - -- Example - - ```js - let volumeId = ""; - volumemanager.unmount(volumeId, function(error, flag){ - // do something - }); - ``` - -## Volume9+ - -**System capability**: SystemCapability.FileManagement.StorageService.Volume - -### Attributes - -| Name | Type | Description | -| ----------- | ------- | -------------------- | -| id9+ | number | Volume ID. | -| uuid9+ | string | Universally unique identifier (UUID) of the volume. | -| description9+ | string | Description of the volume. | -| removable9+ | boolean | Whether the volume is a removable storage device.| -| state9+ | int | Current volume status. | -| path9+ | string | Mount address of the volume. |