1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 */ 19 20import { AsyncCallback } from './@ohos.base'; 21 22export default document; 23 24/** 25 * document 26 * 27 * @namespace document 28 * @syscap SystemCapability.FileManagement.UserFileService 29 * @since 6 30 * @deprecated since 9 31 */ 32declare namespace document { 33 export { choose }; 34 export { show }; 35} 36 37/** 38 * choose. 39 * 40 * @param { string[] } types - type. 41 * @returns { Promise<string> } return Promise 42 * @throws { TypedError } Parameter check failed 43 * @syscap SystemCapability.FileManagement.UserFileService 44 * @since 6 45 * @deprecated since 9 46 */ 47declare function choose(types?: string[]): Promise<string>; 48 49/** 50 * choose. 51 * 52 * @param { AsyncCallback<string> } [callback] - callback. 53 * @throws { TypedError } Parameter check failed 54 * @syscap SystemCapability.FileManagement.UserFileService 55 * @since 6 56 * @deprecated since 9 57 */ 58declare function choose(callback: AsyncCallback<string>): void; 59 60/** 61 * choose. 62 * 63 * @param { string[] } types - type. 64 * @param { AsyncCallback<string> } [callback] - callback. 65 * @throws { TypedError } Parameter check failed 66 * @syscap SystemCapability.FileManagement.UserFileService 67 * @since 6 68 * @deprecated since 9 69 */ 70declare function choose(types: string[], callback: AsyncCallback<string>): void; 71 72/** 73 * show. 74 * 75 * @param { string } uri - uri. 76 * @param { string } type - type. 77 * @returns { Promise<void> } return Promise 78 * @throws { TypedError } Parameter check failed 79 * @syscap SystemCapability.FileManagement.UserFileService 80 * @since 6 81 * @deprecated since 9 82 */ 83declare function show(uri: string, type: string): Promise<void>; 84 85/** 86 * show. 87 * 88 * @param { string } uri - uri. 89 * @param { string } type - type. 90 * @param { AsyncCallback<void> } [callback] - callback. 91 * @throws { TypedError } Parameter check failed 92 * @syscap SystemCapability.FileManagement.UserFileService 93 * @since 6 94 * @deprecated since 9 95 */ 96declare function show(uri: string, type: string, callback: AsyncCallback<void>): void; 97