From 0b71584cdb20b44e3f9d914397d9fb8b2e86ca22 Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Thu, 23 Jun 2022 14:46:53 +0800 Subject: [PATCH 1/2] add getAvailableBytes interface Signed-off-by: haonan_7 --- api/@ohos.statfs.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/@ohos.statfs.d.ts b/api/@ohos.statfs.d.ts index d1798e8e6a..05901c997c 100644 --- a/api/@ohos.statfs.d.ts +++ b/api/@ohos.statfs.d.ts @@ -36,6 +36,13 @@ declare namespace Statfs { */ function getTotalBytes(path: string, callback: AsyncCallback): void; function getTotalBytes(path: string): Promise; + /** + * Get the number of available bytes of the specified path. + * + * @since 9 + */ + function getAvailableBytes(path: string, callback: AsyncCallback): void; + function getAvailableBytes(path: string): Promise; } export default Statfs; -- Gitee From 55fdd5a2a8fd9aa568cc30b85b810db70ac2b635 Mon Sep 17 00:00:00 2001 From: haonan_7 Date: Thu, 30 Jun 2022 15:16:42 +0800 Subject: [PATCH 2/2] add path info Signed-off-by: haonan_7 --- api/@ohos.statfs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.statfs.d.ts b/api/@ohos.statfs.d.ts index 05901c997c..db90b1e755 100644 --- a/api/@ohos.statfs.d.ts +++ b/api/@ohos.statfs.d.ts @@ -38,7 +38,7 @@ declare namespace Statfs { function getTotalBytes(path: string): Promise; /** * Get the number of available bytes of the specified path. - * + * @param path The path is a sandbox path: /data/storage/el2/base/haps/entry/files * @since 9 */ function getAvailableBytes(path: string, callback: AsyncCallback): void; -- Gitee