From 8d4c7c12cb173d6aa7a997e18c7ca28b2b5bee8a Mon Sep 17 00:00:00 2001 From: Storage sandboxing Date: Fri, 24 Dec 2021 19:18:17 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20393e345=20from=20https://gitee.com/stor?= =?UTF-8?q?age-sandboxing/interface=5Fsdk-js/pulls/234=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E@ohos.statfs.d.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Storage sandboxing --- api/@ohos.statfs.d.ts | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 api/@ohos.statfs.d.ts diff --git a/api/@ohos.statfs.d.ts b/api/@ohos.statfs.d.ts new file mode 100644 index 0000000000..53a32c9eab --- /dev/null +++ b/api/@ohos.statfs.d.ts @@ -0,0 +1,42 @@ +/* +* 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 Statfs { + /** + * Get the number of free bytes on the specified path. + * + * @since 8 + */ + function getFreeBytes(path: string, callback: AsyncCallback): void; + function getFreeBytes(path: string): Promise; + /** + * Get the total number of bytes of the specified path. + * + * @since 8 + */ + function getTotalBytes(path: string, callback: AsyncCallback): void; + function getTotalBytes(path: string): Promise; +} + +export default Statfs; -- Gitee