• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 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, Callback } from './@ohos.base';
22import Context from './application/Context';
23
24/**
25 * Provide the capabilities to use different pickers.
26 *
27 * @namespace picker
28 * @syscap SystemCapability.FileManagement.UserFileService
29 * @since 9
30 */
31/**
32 * Provide the capabilities to use different pickers.
33 *
34 * @namespace picker
35 * @syscap SystemCapability.FileManagement.UserFileService
36 * @atomicservice
37 * @since 11
38 */
39declare namespace picker {
40  /**
41   * PhotoViewMIMETypes represents the type of media resource that photo picker selects.
42   *
43   * @enum { string } PhotoViewMIMETypes
44   * @syscap SystemCapability.FileManagement.UserFileService
45   * @since 9
46   */
47  /**
48   * PhotoViewMIMETypes represents the type of media resource that photo picker selects.
49   *
50   * @enum { string } PhotoViewMIMETypes
51   * @syscap SystemCapability.FileManagement.UserFileService
52   * @atomicservice
53   * @since 11
54   */
55  export enum PhotoViewMIMETypes {
56    /**
57     * Image type.
58     *
59     * @syscap SystemCapability.FileManagement.UserFileService
60     * @since 9
61     */
62    /**
63     * Image type.
64     *
65     * @syscap SystemCapability.FileManagement.UserFileService
66     * @atomicservice
67     * @since 11
68     */
69    IMAGE_TYPE = 'image/*',
70
71    /**
72     * Video type.
73     *
74     * @syscap SystemCapability.FileManagement.UserFileService
75     * @since 9
76     */
77    /**
78     * Video type.
79     *
80     * @syscap SystemCapability.FileManagement.UserFileService
81     * @atomicservice
82     * @since 11
83     */
84    VIDEO_TYPE = 'video/*',
85
86    /**
87     * Image and video type.
88     *
89     * @syscap SystemCapability.FileManagement.UserFileService
90     * @since 9
91     */
92    /**
93     * Image and video type.
94     *
95     * @syscap SystemCapability.FileManagement.UserFileService
96     * @atomicservice
97     * @since 11
98     */
99    IMAGE_VIDEO_TYPE = '*/*'
100  }
101
102  /**
103   * PhotoSelectOptions Object
104   *
105   * @syscap SystemCapability.FileManagement.UserFileService
106   * @since 9
107   */
108  /**
109   * PhotoSelectOptions Object
110   *
111   * @syscap SystemCapability.FileManagement.UserFileService
112   * @atomicservice
113   * @since 11
114   */
115  class PhotoSelectOptions {
116    /**
117     * The Type of the file in the picker window.
118     *
119     * @type { ?PhotoViewMIMETypes }
120     * @syscap SystemCapability.FileManagement.UserFileService
121     * @since 9
122     */
123    /**
124     * The Type of the file in the picker window.
125     *
126     * @type { ?PhotoViewMIMETypes }
127     * @syscap SystemCapability.FileManagement.UserFileService
128     * @atomicservice
129     * @since 11
130     */
131    MIMEType?: PhotoViewMIMETypes;
132
133    /**
134     * Maximum number of images for a single selection.
135     *
136     * @type { ?number }
137     * @syscap SystemCapability.FileManagement.UserFileService
138     * @since 9
139     */
140    /**
141     * Maximum number of images for a single selection.
142     *
143     * @type { ?number }
144     * @syscap SystemCapability.FileManagement.UserFileService
145     * @atomicservice
146     * @since 11
147     */
148    maxSelectNumber?: number;
149  }
150
151  /**
152   * PhotoSelectResult Object
153   *
154   * @syscap SystemCapability.FileManagement.UserFileService
155   * @since 9
156   */
157  /**
158   * PhotoSelectResult Object
159   *
160   * @syscap SystemCapability.FileManagement.UserFileService
161   * @atomicservice
162   * @since 11
163   */
164  class PhotoSelectResult {
165    /**
166     * The uris for the selected files.
167     *
168     * @type { Array<string> }
169     * @syscap SystemCapability.FileManagement.UserFileService
170     * @since 9
171     */
172    /**
173     * The uris for the selected files.
174     *
175     * @type { Array<string> }
176     * @syscap SystemCapability.FileManagement.UserFileService
177     * @atomicservice
178     * @since 11
179     */
180    photoUris: Array<string>;
181
182    /**
183     * Original option.
184     *
185     * @type { boolean }
186     * @syscap SystemCapability.FileManagement.UserFileService
187     * @since 9
188     */
189    /**
190     * Original option.
191     *
192     * @type { boolean }
193     * @syscap SystemCapability.FileManagement.UserFileService
194     * @atomicservice
195     * @since 11
196     */
197    isOriginalPhoto: boolean;
198  }
199
200  /**
201   * PhotoSaveOptions Object
202   *
203   * @syscap SystemCapability.FileManagement.UserFileService
204   * @since 9
205   */
206  class PhotoSaveOptions {
207    /**
208     * The names of the files to be saved.
209     *
210     * @type { ?Array<string> }
211     * @syscap SystemCapability.FileManagement.UserFileService
212     * @since 9
213     */
214    newFileNames?: Array<string>;
215  }
216
217  /**
218   * PhotoViewPicker Object
219   *
220   * @syscap SystemCapability.FileManagement.UserFileService
221   * @since 9
222   */
223  /**
224   * PhotoViewPicker Object
225   *
226   * @syscap SystemCapability.FileManagement.UserFileService
227   * @atomicservice
228   * @since 11
229   */
230  class PhotoViewPicker {
231    /**
232     * The constructor used to create a PhotoViewPicker object.
233     *
234     * @syscap SystemCapability.FileManagement.UserFileService
235     * @since 12
236     */
237    constructor();
238
239    /**
240     * The constructor used to create a PhotoViewPicker object.
241     *
242     * @param { Context } context - represents the context.
243     * @syscap SystemCapability.FileManagement.UserFileService
244     * @since 12
245     */
246    constructor(context: Context);
247
248    /**
249     * Pull up the photo picker based on the selection mode.
250     *
251     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
252     * @returns { Promise<PhotoSelectResult> } Returns the uris for the selected files.
253     * @syscap SystemCapability.FileManagement.UserFileService
254     * @since 9
255     */
256    /**
257     * Pull up the photo picker based on the selection mode.
258     *
259     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
260     * @returns { Promise<PhotoSelectResult> } Returns the uris for the selected files.
261     * @syscap SystemCapability.FileManagement.UserFileService
262     * @atomicservice
263     * @since 11
264     */
265    select(option?: PhotoSelectOptions): Promise<PhotoSelectResult>;
266
267    /**
268     * Pull up the photo picker based on the selection mode.
269     *
270     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
271     * @param { AsyncCallback<PhotoSelectResult> } callback - callback
272     * @syscap SystemCapability.FileManagement.UserFileService
273     * @since 9
274     */
275    /**
276     * Pull up the photo picker based on the selection mode.
277     *
278     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
279     * @param { AsyncCallback<PhotoSelectResult> } callback - callback
280     * @syscap SystemCapability.FileManagement.UserFileService
281     * @atomicservice
282     * @since 11
283     */
284    select(option: PhotoSelectOptions, callback: AsyncCallback<PhotoSelectResult>): void;
285
286    /**
287     * Pull up the photo picker based on the selection mode.
288     *
289     * @param { AsyncCallback<PhotoSelectResult> } callback - callback
290     * @syscap SystemCapability.FileManagement.UserFileService
291     * @since 9
292     */
293    /**
294     * Pull up the photo picker based on the selection mode.
295     *
296     * @param { AsyncCallback<PhotoSelectResult> } callback - callback
297     * @syscap SystemCapability.FileManagement.UserFileService
298     * @atomicservice
299     * @since 11
300     */
301    select(callback: AsyncCallback<PhotoSelectResult>): void;
302
303    /**
304     * Pull up the photo picker based on the save mode.
305     *
306     * @param { PhotoSaveOptions } option - represents the options provided in save mode.
307     * @returns { Promise<Array<string>> } Returns the uris for the saved files.
308     * @syscap SystemCapability.FileManagement.UserFileService
309     * @since 9
310     */
311    save(option?: PhotoSaveOptions): Promise<Array<string>>;
312
313    /**
314     * Pull up the photo picker based on the save mode.
315     *
316     * @param { PhotoSaveOptions } option - represents the options provided in save mode.
317     * @param { AsyncCallback<Array<string>> } callback - callback
318     * @syscap SystemCapability.FileManagement.UserFileService
319     * @since 9
320     */
321    save(option: PhotoSaveOptions, callback: AsyncCallback<Array<string>>): void;
322
323    /**
324     * Pull up the photo picker based on the save mode.
325     *
326     * @param { AsyncCallback<Array<string>> } callback - callback
327     * @syscap SystemCapability.FileManagement.UserFileService
328     * @since 9
329     */
330    save(callback: AsyncCallback<Array<string>>): void;
331  }
332
333  /**
334   * Enumerates the picker's select mode types.
335   *
336   * @enum { number } DocumentSelectMode
337   * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
338   * @since 11
339   */
340  /**
341   * Enumerates the picker's select mode types.
342   *
343   * @enum { number } DocumentSelectMode
344   * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
345   * @atomicservice
346   * @since 12
347   */
348  export enum DocumentSelectMode {
349    /**
350     * Indicates that only files are allowed to be selected.
351     *
352     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
353     * @since 11
354     */
355    /**
356     * Indicates that only files are allowed to be selected.
357     *
358     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
359     * @atomicservice
360     * @since 12
361     */
362    FILE = 0,
363
364    /**
365     * Indicates that only folders are allowed to be selected.
366     *
367     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
368     * @since 11
369     */
370    /**
371     * Indicates that only folders are allowed to be selected.
372     *
373     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
374     * @atomicservice
375     * @since 12
376     */
377    FOLDER = 1,
378
379    /**
380     * Indicates that files and folders are allowed to be selected.
381     *
382     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
383     * @since 11
384     */
385    /**
386     * Indicates that files and folders are allowed to be selected.
387     *
388     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
389     * @atomicservice
390     * @since 12
391     */
392    MIXED = 2,
393  }
394
395  /**
396   * Enumerates the picker's mode types.
397   *
398   * @enum { number } DocumentPickerMode
399   * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
400   * @atomicservice
401   * @since 12
402   */
403    export enum DocumentPickerMode {
404      /**
405       * Document mode.
406       *
407       * @syscap SystemCapability.FileManagement.UserFileService
408       * @atomicservice
409       * @since 12
410       */
411      DEFAULT = 0,
412
413      /**
414       * Download mode.
415       *
416       * @syscap SystemCapability.FileManagement.UserFileService
417       * @atomicservice
418       * @since 12
419       */
420      DOWNLOAD = 1,
421    }
422
423  /**
424   * DocumentSelectOptions Object.
425   *
426   * @syscap SystemCapability.FileManagement.UserFileService
427   * @since 9
428   */
429  /**
430   * DocumentSelectOptions Object.
431   *
432   * @syscap SystemCapability.FileManagement.UserFileService
433   * @atomicservice
434   * @since 12
435   */
436  class DocumentSelectOptions {
437    /**
438     * The default opening uri of the picker window.
439     *
440     * @type { ?string }
441     * @syscap SystemCapability.FileManagement.UserFileService
442     * @since 10
443     */
444    /**
445     * The default opening uri of the picker window.
446     *
447     * @type { ?string }
448     * @syscap SystemCapability.FileManagement.UserFileService
449     * @atomicservice
450     * @since 12
451     */
452    defaultFilePathUri?: string;
453
454    /**
455     * Suffixes for file selected.
456     *
457     * @type { ?Array<string> }
458     * @syscap SystemCapability.FileManagement.UserFileService
459     * @since 10
460     */
461    /**
462     * Suffixes for file selected.
463     *
464     * @type { ?Array<string> }
465     * @syscap SystemCapability.FileManagement.UserFileService
466     * @atomicservice
467     * @since 12
468     */
469    fileSuffixFilters?: Array<string>;
470
471    /**
472     * Maximum number of files for a single selection.
473     *
474     * @type { ?number }
475     * @syscap SystemCapability.FileManagement.UserFileService
476     * @since 10
477     */
478    /**
479     * Maximum number of files for a single selection.
480     *
481     * @type { ?number }
482     * @syscap SystemCapability.FileManagement.UserFileService
483     * @atomicservice
484     * @since 12
485     */
486    maxSelectNumber?: number;
487
488    /**
489     * Selection mode.
490     *
491     * @type { ?DocumentSelectMode }
492     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
493     * @since 11
494     */
495    /**
496     * Selection mode.
497     *
498     * @type { ?DocumentSelectMode }
499     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
500     * @atomicservice
501     * @since 12
502     */
503    selectMode?: DocumentSelectMode;
504
505    /**
506     * Granting Permissions to Specified Directories or Files.
507     * The value true indicates that authorization is required.
508     * When authmode is set to true, the defaultFilePathUri field is mandatory.
509     *
510     * @type { ?boolean }
511     * @syscap SystemCapability.FileManagement.UserFileService.FolderSelection
512     * @atomicservice
513     * @since 12
514     */
515    authMode?: boolean;
516  }
517
518  /**
519   * DocumentSaveOptions Object
520   *
521   * @syscap SystemCapability.FileManagement.UserFileService
522   * @since 9
523   */
524  /**
525   * DocumentSaveOptions Object
526   *
527   * @syscap SystemCapability.FileManagement.UserFileService
528   * @atomicservice
529   * @since 12
530   */
531  class DocumentSaveOptions {
532    /**
533     * The names of the files to be saved.
534     *
535     * @type { ?Array<string> }
536     * @syscap SystemCapability.FileManagement.UserFileService
537     * @since 9
538     */
539    /**
540     * The names of the files to be saved.
541     *
542     * @type { ?Array<string> }
543     * @syscap SystemCapability.FileManagement.UserFileService
544     * @atomicservice
545     * @since 12
546     */
547    newFileNames?: Array<string>;
548
549    /**
550     * The default opening uri of the picker window.
551     *
552     * @type { ?string }
553     * @syscap SystemCapability.FileManagement.UserFileService
554     * @since 10
555     */
556    /**
557     * The default opening uri of the picker window.
558     *
559     * @type { ?string }
560     * @syscap SystemCapability.FileManagement.UserFileService
561     * @atomicservice
562     * @since 12
563     */
564    defaultFilePathUri?: string;
565
566    /**
567     * Suffixes for file saved.
568     *
569     * @type { ?Array<string> }
570     * @syscap SystemCapability.FileManagement.UserFileService
571     * @since 10
572     */
573    /**
574     * Suffixes for file saved.
575     *
576     * @type { ?Array<string> }
577     * @syscap SystemCapability.FileManagement.UserFileService
578     * @atomicservice
579     * @since 12
580     */
581    fileSuffixChoices?: Array<string>;
582    /**
583     * picker mode.
584     *
585     * @type { ?DocumentPickerMode }
586     * @syscap SystemCapability.FileManagement.UserFileService
587     * @atomicservice
588     * @since 12
589     */
590    pickerMode?: DocumentPickerMode;
591  }
592
593  /**
594   * DocumentViewPicker Object
595   *
596   * @syscap SystemCapability.FileManagement.UserFileService
597   * @since 9
598   */
599  /**
600   * DocumentViewPicker Object
601   *
602   * @syscap SystemCapability.FileManagement.UserFileService
603   * @atomicservice
604   * @since 12
605   */
606  class DocumentViewPicker {
607    /**
608     * The constructor used to create a DocumentViewPicker object.
609     *
610     * @syscap SystemCapability.FileManagement.UserFileService
611     * @since 12
612     */
613    constructor();
614
615    /**
616     * The constructor used to create a DocumentViewPicker object.
617     *
618     * @param { Context } context - represents the context.
619     * @syscap SystemCapability.FileManagement.UserFileService
620     * @since 12
621     */
622    constructor(context: Context);
623
624    /**
625     * Pull up the document picker based on the selection mode.
626     *
627     * @param { DocumentSelectOptions } option - represents the options provided in select mode.
628     * @returns { Promise<Array<string>> } Returns the uris for the selected files.
629     * @syscap SystemCapability.FileManagement.UserFileService
630     * @since 9
631     */
632    /**
633     * Pull up the document picker based on the selection mode.
634     *
635     * @param { DocumentSelectOptions } option - represents the options provided in select mode.
636     * @returns { Promise<Array<string>> } Returns the uris for the selected files.
637     * @syscap SystemCapability.FileManagement.UserFileService
638     * @atomicservice
639     * @since 12
640     */
641    select(option?: DocumentSelectOptions): Promise<Array<string>>;
642
643    /**
644     * Pull up the document picker based on the selection mode.
645     *
646     * @param { DocumentSelectOptions } option - represents the options provided in select mode.
647     * @param { AsyncCallback<Array<string>> } callback - callback
648     * @syscap SystemCapability.FileManagement.UserFileService
649     * @since 9
650     */
651    /**
652     * Pull up the document picker based on the selection mode.
653     *
654     * @param { DocumentSelectOptions } option - represents the options provided in select mode.
655     * @param { AsyncCallback<Array<string>> } callback - callback
656     * @syscap SystemCapability.FileManagement.UserFileService
657     * @atomicservice
658     * @since 12
659     */
660    select(option: DocumentSelectOptions, callback: AsyncCallback<Array<string>>): void;
661
662    /**
663     * Pull up the document picker based on the selection mode.
664     *
665     * @param { AsyncCallback<Array<string>> } callback - callback
666     * @syscap SystemCapability.FileManagement.UserFileService
667     * @since 9
668     */
669    /**
670     * Pull up the document picker based on the selection mode.
671     *
672     * @param { AsyncCallback<Array<string>> } callback - callback
673     * @syscap SystemCapability.FileManagement.UserFileService
674     * @atomicservice
675     * @since 12
676     */
677    select(callback: AsyncCallback<Array<string>>): void;
678
679    /**
680     * Pull up the document picker based on the save mode.
681     *
682     * @param { DocumentSaveOptions } option - represents the options provided in save mode.
683     * @returns { Promise<Array<string>> } Returns the uris for the saved files.
684     * @syscap SystemCapability.FileManagement.UserFileService
685     * @since 9
686     */
687    /**
688     * Pull up the document picker based on the save mode.
689     *
690     * @param { DocumentSaveOptions } option - represents the options provided in save mode.
691     * @returns { Promise<Array<string>> } Returns the uris for the saved files.
692     * @syscap SystemCapability.FileManagement.UserFileService
693     * @atomicservice
694     * @since 12
695     */
696    save(option?: DocumentSaveOptions): Promise<Array<string>>;
697
698    /**
699     * Pull up the document picker based on the save mode.
700     *
701     * @param { DocumentSaveOptions } option - represents the options provided in save mode.
702     * @param { AsyncCallback<Array<string>> } callback - callback
703     * @syscap SystemCapability.FileManagement.UserFileService
704     * @since 9
705     */
706    /**
707     * Pull up the document picker based on the save mode.
708     *
709     * @param { DocumentSaveOptions } option - represents the options provided in save mode.
710     * @param { AsyncCallback<Array<string>> } callback - callback
711     * @syscap SystemCapability.FileManagement.UserFileService
712     * @atomicservice
713     * @since 12
714     */
715    save(option: DocumentSaveOptions, callback: AsyncCallback<Array<string>>): void;
716
717    /**
718     * Pull up the document picker based on the save mode.
719     *
720     * @param { AsyncCallback<Array<string>> } callback - callback
721     * @syscap SystemCapability.FileManagement.UserFileService
722     * @since 9
723     */
724    /**
725     * Pull up the document picker based on the save mode.
726     *
727     * @param { AsyncCallback<Array<string>> } callback - callback
728     * @syscap SystemCapability.FileManagement.UserFileService
729     * @atomicservice
730     * @since 12
731     */
732    save(callback: AsyncCallback<Array<string>>): void;
733  }
734
735  /**
736   * AudioSelectOptions Object. Currently not supported.
737   *
738   * @syscap SystemCapability.FileManagement.UserFileService
739   * @since 9
740   */
741    /**
742   * AudioSelectOptions Object.
743   *
744   * @syscap SystemCapability.FileManagement.UserFileService
745   * @since 12
746   */
747    class AudioSelectOptions {
748      /**
749       * Maximum number of audio for a single selection.
750       *
751       * @type { ?number }
752       * @syscap SystemCapability.FileManagement.UserFileService
753       * @atomicservice
754       * @since 12
755       */
756      maxSelectNumber?: number;
757    }
758
759  /**
760   * AudioSaveOptions Object
761   *
762   * @syscap SystemCapability.FileManagement.UserFileService
763   * @since 9
764   */
765  class AudioSaveOptions {
766    /**
767     * The names of the files to be saved.
768     *
769     * @type { ?Array<string> }
770     * @syscap SystemCapability.FileManagement.UserFileService
771     * @since 9
772     */
773    newFileNames?: Array<string>;
774  }
775
776  /**
777   * AudioViewPicker Object
778   *
779   * @syscap SystemCapability.FileManagement.UserFileService
780   * @since 9
781   */
782  class AudioViewPicker {
783    /**
784     * The constructor used to create a AudioViewPicker object.
785     *
786     * @syscap SystemCapability.FileManagement.UserFileService
787     * @since 12
788     */
789    constructor();
790
791    /**
792     * The constructor used to create a AudioViewPicker object.
793     *
794     * @param { Context } context - represents the context.
795     * @syscap SystemCapability.FileManagement.UserFileService
796     * @since 12
797     */
798    constructor(context: Context);
799
800    /**
801     * Pull up the audio picker based on the selection mode.
802     *
803     * @param { AudioSelectOptions } option - represents the options provided in select mode.
804     * @returns { Promise<Array<string>> } Returns the uris for the selected files.
805     * @syscap SystemCapability.FileManagement.UserFileService
806     * @since 9
807     */
808    select(option?: AudioSelectOptions): Promise<Array<string>>;
809
810    /**
811     * Pull up the audio picker based on the selection mode.
812     *
813     * @param { AudioSelectOptions } option - represents the options provided in select mode.
814     * @param { AsyncCallback<Array<string>> } callback - callback
815     * @syscap SystemCapability.FileManagement.UserFileService
816     * @since 9
817     */
818    select(option: AudioSelectOptions, callback: AsyncCallback<Array<string>>): void;
819
820    /**
821     * Pull up the audio picker based on the selection mode.
822     *
823     * @param { AsyncCallback<Array<string>> } callback - callback
824     * @syscap SystemCapability.FileManagement.UserFileService
825     * @since 9
826     */
827    select(callback: AsyncCallback<Array<string>>): void;
828
829    /**
830     * Pull up the audio picker based on the save mode.
831     *
832     * @param { AudioSaveOptions } option - represents the options provided in save mode.
833     * @returns { Promise<Array<string>> } Returns the uris for the saved files.
834     * @syscap SystemCapability.FileManagement.UserFileService
835     * @since 9
836     */
837    save(option?: AudioSaveOptions): Promise<Array<string>>;
838
839    /**
840     * Pull up the audio picker based on the save mode.
841     *
842     * @param { AudioSaveOptions } option - represents the options provided in save mode.
843     * @param { AsyncCallback<Array<string>> } callback - callback
844     * @syscap SystemCapability.FileManagement.UserFileService
845     * @since 9
846     */
847    save(option: AudioSaveOptions, callback: AsyncCallback<Array<string>>): void;
848
849    /**
850     * Pull up the audio picker based on the save mode.
851     *
852     * @param { AsyncCallback<Array<string>> } callback - callback
853     * @syscap SystemCapability.FileManagement.UserFileService
854     * @since 9
855     */
856    save(callback: AsyncCallback<Array<string>>): void;
857  }
858}
859
860export default picker;
861