diff --git a/api/@ohos.file.storageStatistics.d.ts b/api/@ohos.file.storageStatistics.d.ts index 04b5758c20f81cbc7bdef5cd0c85131c5a11855f..280a48797e82977d287228caf1fddfad93e9ce71 100644 --- a/api/@ohos.file.storageStatistics.d.ts +++ b/api/@ohos.file.storageStatistics.d.ts @@ -34,7 +34,7 @@ declare namespace storageStatistics { * * @permission ohos.permission.STORAGE_MANAGER * @param { string } volumeUuid - The uuid of the volume - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory @@ -46,15 +46,16 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 8 dynamic + * @since 20 static */ - function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; /** * Get the total size of volume. * * @permission ohos.permission.STORAGE_MANAGER * @param { string } volumeUuid - The uuid of the volume - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory @@ -66,14 +67,15 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 8 dynamic + * @since 20 static */ - function getTotalSizeOfVolume(volumeUuid: string): Promise; + function getTotalSizeOfVolume(volumeUuid: string): Promise; /** * Get the free size of volume. * * @permission ohos.permission.STORAGE_MANAGER * @param { string } volumeUuid - The uuid of the volume - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory @@ -85,15 +87,16 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 8 dynamic + * @since 20 static */ - function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; /** * Get the free size of volume. * * @permission ohos.permission.STORAGE_MANAGER * @param { string } volumeUuid - The uuid of the volume - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory @@ -105,8 +108,9 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 8 dynamic + * @since 20 static */ - function getFreeSizeOfVolume(volumeUuid: string): Promise; + function getFreeSizeOfVolume(volumeUuid: string): Promise; /** * Get the bundle statistics. @@ -171,7 +175,7 @@ parameters are left unspecified; * @permission ohos.permission.STORAGE_MANAGER * @param { string } packageName - The name of the application * @param { AsyncCallback } callback - callback - * @param { number } index - The index number of the clone application, the default value is 0. + * @param { int } index - The index number of the clone application, the default value is 0. * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid. @@ -181,8 +185,9 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 12 dynamic + * @since 20 static */ - function getBundleStats(packageName: string, callback: AsyncCallback, index?: number): void; + function getBundleStats(packageName: string, callback: AsyncCallback, index?: int): void; /** * Get the bundle statistics. @@ -207,7 +212,7 @@ parameters are left unspecified; * * @permission ohos.permission.STORAGE_MANAGER * @param { string } packageName - The name of the application - * @param { number } index - The index number of the clone application, the default value is 0. + * @param { int } index - The index number of the clone application, the default value is 0. * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -218,8 +223,9 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 12 dynamic + * @since 20 static */ - function getBundleStats(packageName: string, index?: number): Promise; + function getBundleStats(packageName: string, index?: int): Promise; /** * Get the current bundle statistics. @@ -253,7 +259,7 @@ parameters are left unspecified; * Get the system size. * * @permission ohos.permission.STORAGE_MANAGER - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory @@ -263,14 +269,15 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 9 dynamic + * @since 20 static */ - function getSystemSize(callback: AsyncCallback): void; + function getSystemSize(callback: AsyncCallback): void; /** * Get the system size. * * @permission ohos.permission.STORAGE_MANAGER - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory @@ -280,8 +287,9 @@ parameters are left unspecified; * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi * @since 9 dynamic + * @since 20 static */ - function getSystemSize(): Promise; + function getSystemSize(): Promise; /** * Get the user storage statistics. @@ -509,13 +517,14 @@ parameters are left unspecified; /** * Get the total size with sync interface * - * @returns { number } return the total size + * @returns { long } return the total size * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @since 15 dynamic + * @since 20 static */ - function getTotalSizeSync(): number; + function getTotalSizeSync(): long; /** * Get the free size. @@ -591,13 +600,14 @@ parameters are left unspecified; /** * Get the free size with sync interface. * - * @returns { number } return the free size + * @returns { long } return the free size * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @since 15 dynamic + * @since 20 static */ - function getFreeSizeSync(): number; + function getFreeSizeSync(): long; } export default storageStatistics;