From 91508c4ae27a2da423f91776a752a75e9eba1367 Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Mon, 7 Feb 2022 17:27:51 +0800 Subject: [PATCH 1/5] add @ohos.storagestatistics.d.ts Signed-off-by: haonan_7 --- api/@ohos.storagestatistics.d.ts | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 api/@ohos.storagestatistics.d.ts diff --git a/api/@ohos.storagestatistics.d.ts b/api/@ohos.storagestatistics.d.ts new file mode 100644 index 0000000000..9f77f86a05 --- /dev/null +++ b/api/@ohos.storagestatistics.d.ts @@ -0,0 +1,57 @@ +/* +* Copyright (C) 2021 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import {AsyncCallback, Callback} from "./basic"; + +/** + * Provides filesystem statistics APIs + * + * @since 8 + * @sysCap N/A + * @devices phone, tablet + */ +declare namespace storageStatistics { + /** + * Get the totalSize of volume. + * + * @since 8 + */ + function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getTotalSizeOfVolume(volumeUuid: string): Promise; + /** + * Get the free size Of volume. + * + * @since 8 + */ + function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getFreeSizeOfVolume(volumeUuid: string): Promise; + + /** + * Get the bundlestat + * + * @since 8 + */ + + export interface BundleStats { + appSize: number; + cacheSize: number; + dataSize: number; +} + function getBundleStats(volumeUuid: string, packageName: string, callback: AsyncCallback): void; + function getBundleStats(volumeUuid: string, packageName: string): Promise; + +} + +export default storageStatistics; -- Gitee From cd24359c538088dd2434e6f8c42f56f575d9ef81 Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Tue, 8 Feb 2022 02:46:04 +0000 Subject: [PATCH 2/5] rename api/@ohos.storagestatistics.d.ts to api/@ohos.storageStatistics.d.ts. --- ...{@ohos.storagestatistics.d.ts => @ohos.storageStatistics.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/{@ohos.storagestatistics.d.ts => @ohos.storageStatistics.d.ts} (100%) diff --git a/api/@ohos.storagestatistics.d.ts b/api/@ohos.storageStatistics.d.ts similarity index 100% rename from api/@ohos.storagestatistics.d.ts rename to api/@ohos.storageStatistics.d.ts -- Gitee From 45e9fa1ad431272a7d29983f96f4abc4a4393831 Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Mon, 7 Feb 2022 17:27:51 +0800 Subject: [PATCH 3/5] add @ohos.storagestatistics.d.ts Signed-off-by: haonan_7 --- api/@ohos.storagestatistics.d.ts | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 api/@ohos.storagestatistics.d.ts diff --git a/api/@ohos.storagestatistics.d.ts b/api/@ohos.storagestatistics.d.ts new file mode 100644 index 0000000000..9f77f86a05 --- /dev/null +++ b/api/@ohos.storagestatistics.d.ts @@ -0,0 +1,57 @@ +/* +* Copyright (C) 2021 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import {AsyncCallback, Callback} from "./basic"; + +/** + * Provides filesystem statistics APIs + * + * @since 8 + * @sysCap N/A + * @devices phone, tablet + */ +declare namespace storageStatistics { + /** + * Get the totalSize of volume. + * + * @since 8 + */ + function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getTotalSizeOfVolume(volumeUuid: string): Promise; + /** + * Get the free size Of volume. + * + * @since 8 + */ + function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getFreeSizeOfVolume(volumeUuid: string): Promise; + + /** + * Get the bundlestat + * + * @since 8 + */ + + export interface BundleStats { + appSize: number; + cacheSize: number; + dataSize: number; +} + function getBundleStats(volumeUuid: string, packageName: string, callback: AsyncCallback): void; + function getBundleStats(volumeUuid: string, packageName: string): Promise; + +} + +export default storageStatistics; -- Gitee From be8a26efac873b59b05b6c00bbe988f56499c97b Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Tue, 8 Feb 2022 17:01:07 +0800 Subject: [PATCH 4/5] del @ohos.storageStatistics.d.ts Signed-off-by: haonan_7 --- api/@ohos.storageStatistics.d.ts | 57 -------------------------------- api/@ohos.storagestatistics.d.ts | 57 -------------------------------- 2 files changed, 114 deletions(-) delete mode 100644 api/@ohos.storageStatistics.d.ts delete mode 100644 api/@ohos.storagestatistics.d.ts diff --git a/api/@ohos.storageStatistics.d.ts b/api/@ohos.storageStatistics.d.ts deleted file mode 100644 index 9f77f86a05..0000000000 --- a/api/@ohos.storageStatistics.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import {AsyncCallback, Callback} from "./basic"; - -/** - * Provides filesystem statistics APIs - * - * @since 8 - * @sysCap N/A - * @devices phone, tablet - */ -declare namespace storageStatistics { - /** - * Get the totalSize of volume. - * - * @since 8 - */ - function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; - function getTotalSizeOfVolume(volumeUuid: string): Promise; - /** - * Get the free size Of volume. - * - * @since 8 - */ - function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; - function getFreeSizeOfVolume(volumeUuid: string): Promise; - - /** - * Get the bundlestat - * - * @since 8 - */ - - export interface BundleStats { - appSize: number; - cacheSize: number; - dataSize: number; -} - function getBundleStats(volumeUuid: string, packageName: string, callback: AsyncCallback): void; - function getBundleStats(volumeUuid: string, packageName: string): Promise; - -} - -export default storageStatistics; diff --git a/api/@ohos.storagestatistics.d.ts b/api/@ohos.storagestatistics.d.ts deleted file mode 100644 index 9f77f86a05..0000000000 --- a/api/@ohos.storagestatistics.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Copyright (C) 2021 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import {AsyncCallback, Callback} from "./basic"; - -/** - * Provides filesystem statistics APIs - * - * @since 8 - * @sysCap N/A - * @devices phone, tablet - */ -declare namespace storageStatistics { - /** - * Get the totalSize of volume. - * - * @since 8 - */ - function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; - function getTotalSizeOfVolume(volumeUuid: string): Promise; - /** - * Get the free size Of volume. - * - * @since 8 - */ - function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; - function getFreeSizeOfVolume(volumeUuid: string): Promise; - - /** - * Get the bundlestat - * - * @since 8 - */ - - export interface BundleStats { - appSize: number; - cacheSize: number; - dataSize: number; -} - function getBundleStats(volumeUuid: string, packageName: string, callback: AsyncCallback): void; - function getBundleStats(volumeUuid: string, packageName: string): Promise; - -} - -export default storageStatistics; -- Gitee From 4792699bd8a8e3b532c3ffea803a0f67a318326b Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Tue, 8 Feb 2022 17:03:15 +0800 Subject: [PATCH 5/5] add @ohos.storageStatistics.d.ts Signed-off-by: haonan_7 --- api/@ohos.storageStatistics.d.ts | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 api/@ohos.storageStatistics.d.ts diff --git a/api/@ohos.storageStatistics.d.ts b/api/@ohos.storageStatistics.d.ts new file mode 100644 index 0000000000..9f77f86a05 --- /dev/null +++ b/api/@ohos.storageStatistics.d.ts @@ -0,0 +1,57 @@ +/* +* Copyright (C) 2021 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import {AsyncCallback, Callback} from "./basic"; + +/** + * Provides filesystem statistics APIs + * + * @since 8 + * @sysCap N/A + * @devices phone, tablet + */ +declare namespace storageStatistics { + /** + * Get the totalSize of volume. + * + * @since 8 + */ + function getTotalSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getTotalSizeOfVolume(volumeUuid: string): Promise; + /** + * Get the free size Of volume. + * + * @since 8 + */ + function getFreeSizeOfVolume(volumeUuid: string, callback: AsyncCallback): void; + function getFreeSizeOfVolume(volumeUuid: string): Promise; + + /** + * Get the bundlestat + * + * @since 8 + */ + + export interface BundleStats { + appSize: number; + cacheSize: number; + dataSize: number; +} + function getBundleStats(volumeUuid: string, packageName: string, callback: AsyncCallback): void; + function getBundleStats(volumeUuid: string, packageName: string): Promise; + +} + +export default storageStatistics; -- Gitee