• 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 * @import import document from '@ohos.document';
24 * @permission N/A
25 */
26declare namespace document {
27    export { choose };
28    export { show };
29}
30
31/**
32 * choose.
33 *
34 * @note N/A
35 * @syscap SystemCapability.FileManagement.UserFileService
36 * @since 6
37 * @permission N/A
38 * @function choose
39 * @param {string} type - type.
40 * @param {AsyncCallback<void>} [callback] - callback.
41 * @returns {void | Promise<void>} no callback return Promise otherwise return void
42 * @throws {TypedError} Parameter check failed
43 */
44declare function choose(types?: string[]): Promise<string>;
45declare function choose(callback: AsyncCallback<string>): void;
46declare function choose(types: string[], callback: AsyncCallback<string>): void;
47
48/**
49 * show.
50 *
51 * @note N/A
52 * @syscap SystemCapability.FileManagement.UserFileService
53 * @since 6
54 * @permission N/A
55 * @function show
56 * @param {string} uri - uri.
57 * @param {string} type - type.
58 * @param {AsyncCallback<void>} [callback] - callback.
59 * @returns {void | Promise<void>} no callback return Promise otherwise return void
60 * @throws {TypedError} Parameter check failed
61 */
62declare function show(uri: string, type: string): Promise<void>;
63declare function show(uri: string, type: string, callback: AsyncCallback<void>): void;