• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * @kit CoreFileKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22
23export default document;
24
25/**
26 * document
27 *
28 * @namespace document
29 * @syscap SystemCapability.FileManagement.UserFileService
30 * @since 6
31 * @deprecated since 9
32 */
33declare namespace document {
34  export { choose };
35  export { show };
36}
37
38/**
39 * choose.
40 *
41 * @param { string[] } types - type.
42 * @returns { Promise<string> } return Promise
43 * @throws { TypedError } Parameter check failed
44 * @syscap SystemCapability.FileManagement.UserFileService
45 * @since 6
46 * @deprecated since 9
47 */
48declare function choose(types?: string[]): Promise<string>;
49
50/**
51 * choose.
52 *
53 * @param { AsyncCallback<string> } [callback] - callback.
54 * @throws { TypedError } Parameter check failed
55 * @syscap SystemCapability.FileManagement.UserFileService
56 * @since 6
57 * @deprecated since 9
58 */
59declare function choose(callback: AsyncCallback<string>): void;
60
61/**
62 * choose.
63 *
64 * @param { string[] } types - type.
65 * @param { AsyncCallback<string> } [callback] - callback.
66 * @throws { TypedError } Parameter check failed
67 * @syscap SystemCapability.FileManagement.UserFileService
68 * @since 6
69 * @deprecated since 9
70 */
71declare function choose(types: string[], callback: AsyncCallback<string>): void;
72
73/**
74 * show.
75 *
76 * @param { string } uri - uri.
77 * @param { string } type - type.
78 * @returns { Promise<void> } return Promise
79 * @throws { TypedError } Parameter check failed
80 * @syscap SystemCapability.FileManagement.UserFileService
81 * @since 6
82 * @deprecated since 9
83 */
84declare function show(uri: string, type: string): Promise<void>;
85
86/**
87 * show.
88 *
89 * @param { string } uri - uri.
90 * @param { string } type - type.
91 * @param { AsyncCallback<void> } [callback] - callback.
92 * @throws { TypedError } Parameter check failed
93 * @syscap SystemCapability.FileManagement.UserFileService
94 * @since 6
95 * @deprecated since 9
96 */
97declare function show(uri: string, type: string, callback: AsyncCallback<void>): void;
98