• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 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 */
15import { AsyncCallback } from './basic'
16
17export default document;
18
19/**
20 * document
21 * @syscap SystemCapability.FileManagement.UserFileService
22 * @since 6
23 * @permission N/A
24 */
25declare namespace document {
26    export { choose };
27    export { show };
28}
29
30/**
31 * choose.
32 *
33 * @syscap SystemCapability.FileManagement.UserFileService
34 * @since 6
35 * @permission N/A
36 * @function choose
37 * @param {string} type - type.
38 * @param {AsyncCallback<void>} [callback] - callback.
39 * @returns {void | Promise<void>} no callback return Promise otherwise return void
40 * @throws {TypedError} Parameter check failed
41 * @deprecated since 9
42 */
43declare function choose(types?: string[]): Promise<string>;
44declare function choose(callback: AsyncCallback<string>): void;
45declare function choose(types: string[], callback: AsyncCallback<string>): void;
46
47/**
48 * show.
49 *
50 * @syscap SystemCapability.FileManagement.UserFileService
51 * @since 6
52 * @permission N/A
53 * @function show
54 * @param {string} uri - uri.
55 * @param {string} type - type.
56 * @param {AsyncCallback<void>} [callback] - callback.
57 * @returns {void | Promise<void>} no callback return Promise otherwise return void
58 * @throws {TypedError} Parameter check failed
59 * @deprecated since 9
60 */
61declare function show(uri: string, type: string): Promise<void>;
62declare function show(uri: string, type: string, callback: AsyncCallback<void>): void;