From 942d5e0ae6384af1a5f104426f708583aa02c5c2 Mon Sep 17 00:00:00 2001 From: wangminmin Date: Tue, 27 Dec 2022 11:54:29 +0800 Subject: [PATCH 1/7] add file.picker.d.ts Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 189 +++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 api/@ohos.file.picker.d.ts diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts new file mode 100644 index 0000000000..d3e83d57a3 --- /dev/null +++ b/api/@ohos.file.picker.d.ts @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback, Callback } from "./basic"; + +/** + * This module provides the capability to use different types of pickers. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ +declare namespace picker { + /** + * PhotoPickerMIMETypes represents the type of media resource that photo picker selects. + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + export enum PhotoViewMIMETypes { + IMAGE_TYPE = "image/*", + VIDEO_TYPE = "video/*", + IMAGE_VIDEO_TYPE = "*/*" + } + + /** + * PhotoPickerSelectOption Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface PhotoSelectOptions { + /** + * @type {PhotoPickerMIMETypes} + * @since 9 + */ + pickerMIMEType?: PhotoViewMIMETypes; + + /** + * @type {number} + * @since 9 + */ + maxSelectNumber?: number; + } + + /** + * PhotoPickerSelectResult Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface PhotoSelectResult { + /** + * @type {Array} + * @since 9 + */ + photoUris: Array; + + /** + * @type {boolean} + * @since 9 + */ + isOriginalPhoto: boolean; + } + + /** + * PhotoPickerViewController Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface PhotoViewPicker { + /** + * Pull up the photo picker based on the selection mode. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + * @param PhotoPickerSelectOption represents the options provided in select mode. + * @returns {(void | Promise)} Returns the selector result. + */ + select(option: PhotoSelectOptions) : Promise; + select(option: PhotoSelectOptions, callback: AsyncCallback) : void; + } + + /** + * DocumentPickerSelectOption Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface DocumentSelectOption { + /** + * @type {string} + * @since 9 + */ + defaultPath?: string; + + /** + * @type {Array} + * @since 9 + */ + pickerSubMIMEType?: Array; + + /** + * @type {number} + * @since 9 + */ + maxSelectNumber?: number; + } + + /** + * DocumentPickerSaveOption Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface DocumentSaveOption { + /** + * @type {Array} + * @since 9 + */ + NewFileName?: Array; + } + + /** + * DocumentPickerViewController Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface DocumentViewPicker { + /** + * Pull up the document picker based on the selection mode. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + * @param DocumentPickerSelectOption represents the options provided in select mode. + * @returns {(void | Promise>)} Returns the selector result. + */ + select(option: DocumentSelectOption) : Promise>; + select(option: DocumentSelectOption, callback: AsyncCallback>) : void; + + /** + * Pull up the document picker based on the save mode. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + * @param DocumentPickerSaveOption represents the options provided in save mode. + * @returns {(void | Promise>)} Returns the save result. + */ + save(option: DocumentSaveOption) : Promise>; + save(option: DocumentSaveOption, callback: AsyncCallback>) : void; + } + + /** + * AudioPickerSelectOption Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface AudioSelectOption { + /** + * @type {number} + * @since 9 + */ + maxSelectNumber?: number; + } + + /** + * AudioPickerViewController Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface AudioViewPicker { + /** + * Pull up the audio picker based on the selection mode. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + * @param AudioPickerSelectOption represents the options provided in select mode. + * @returns {(void | Promise>)} Returns the selector result. + */ + select(option: AudioSelectOption) : Promise>; + select(option: AudioSelectOption, callback: AsyncCallback>) : void; + } +} \ No newline at end of file -- Gitee From e40c789f6463891ebfb8d43f693754a1972c631a Mon Sep 17 00:00:00 2001 From: wangminmin Date: Mon, 9 Jan 2023 02:16:04 +0000 Subject: [PATCH 2/7] fix picker Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts index d3e83d57a3..7e3c7fe356 100644 --- a/api/@ohos.file.picker.d.ts +++ b/api/@ohos.file.picker.d.ts @@ -43,7 +43,7 @@ declare namespace picker { * @type {PhotoPickerMIMETypes} * @since 9 */ - pickerMIMEType?: PhotoViewMIMETypes; + MIMEType?: PhotoViewMIMETypes; /** * @type {number} @@ -105,7 +105,7 @@ declare namespace picker { * @type {Array} * @since 9 */ - pickerSubMIMEType?: Array; + subMIMEType?: Array; /** * @type {number} -- Gitee From bbed2dbd7a2c35f470ee64039f8031f4477f69f1 Mon Sep 17 00:00:00 2001 From: wangminmin Date: Mon, 9 Jan 2023 02:21:00 +0000 Subject: [PATCH 3/7] fix Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 106 +++++++++++++++++++++++++++---------- 1 file changed, 77 insertions(+), 29 deletions(-) diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts index 7e3c7fe356..42cf0c9d10 100644 --- a/api/@ohos.file.picker.d.ts +++ b/api/@ohos.file.picker.d.ts @@ -23,7 +23,7 @@ import { AsyncCallback, Callback } from "./basic"; */ declare namespace picker { /** - * PhotoPickerMIMETypes represents the type of media resource that photo picker selects. + * PhotoViewMIMETypes represents the type of media resource that photo picker selects. * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ @@ -34,13 +34,13 @@ declare namespace picker { } /** - * PhotoPickerSelectOption Object + * PhotoSelectOptions Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ interface PhotoSelectOptions { /** - * @type {PhotoPickerMIMETypes} + * @type {PhotoViewMIMETypes} * @since 9 */ MIMEType?: PhotoViewMIMETypes; @@ -53,7 +53,7 @@ declare namespace picker { } /** - * PhotoPickerSelectResult Object + * PhotoSelectResult Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ @@ -72,7 +72,20 @@ declare namespace picker { } /** - * PhotoPickerViewController Object + * PhotoSaveOptions Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface PhotoSaveOptions { + /** + * @type {Array} + * @since 9 + */ + newFileNames?: Array; + } + + /** + * PhotoViewPicker Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ @@ -81,31 +94,42 @@ declare namespace picker { * Pull up the photo picker based on the selection mode. * * @since 9 - * @syscap SystemCapability.FileManagement.UserFileService - * @param PhotoPickerSelectOption represents the options provided in select mode. - * @returns {(void | Promise)} Returns the selector result. + * @syscap SystemCapability.FileManagement.UserFileService + * @param PhotoSelectOptions represents the options provided in select mode. + * @returns {(void | Promise)} Returns the selector result. */ select(option: PhotoSelectOptions) : Promise; select(option: PhotoSelectOptions, callback: AsyncCallback) : void; + + /** + * Pull up the photo picker based on the save mode. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + * @param PhotoSaveOptions represents the options provided in save mode. + * @returns {(void | Promise>)} Returns the save result. + */ + save(option: PhotoSaveOptions) : Promise>; + save(option: PhotoSaveOptions, callback: AsyncCallback>) : void; } /** - * DocumentPickerSelectOption Object + * DocumentSelectOptions Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ - interface DocumentSelectOption { + interface DocumentSelectOptions { /** * @type {string} * @since 9 */ - defaultPath?: string; + defaultFilePathUri?: string; /** * @type {Array} * @since 9 */ - subMIMEType?: Array; + subMIMETypes?: Array; /** * @type {number} @@ -115,20 +139,20 @@ declare namespace picker { } /** - * DocumentPickerSaveOption Object + * DocumentSaveOptions Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ - interface DocumentSaveOption { + interface DocumentSaveOptions { /** * @type {Array} * @since 9 */ - NewFileName?: Array; + newFileNames?: Array; } /** - * DocumentPickerViewController Object + * DocumentViewPicker Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ @@ -138,30 +162,30 @@ declare namespace picker { * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService - * @param DocumentPickerSelectOption represents the options provided in select mode. + * @param DocumentSelectOptions represents the options provided in select mode. * @returns {(void | Promise>)} Returns the selector result. */ - select(option: DocumentSelectOption) : Promise>; - select(option: DocumentSelectOption, callback: AsyncCallback>) : void; + select(option: DocumentSelectOptions) : Promise>; + select(option: DocumentSelectOptions, callback: AsyncCallback>) : void; /** * Pull up the document picker based on the save mode. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService - * @param DocumentPickerSaveOption represents the options provided in save mode. + * @param DocumentSaveOptions represents the options provided in save mode. * @returns {(void | Promise>)} Returns the save result. */ - save(option: DocumentSaveOption) : Promise>; - save(option: DocumentSaveOption, callback: AsyncCallback>) : void; + save(option: DocumentSaveOptions) : Promise>; + save(option: DocumentSaveOptions, callback: AsyncCallback>) : void; } /** - * AudioPickerSelectOption Object + * AudioSelectOptions Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ - interface AudioSelectOption { + interface AudioSelectOptions { /** * @type {number} * @since 9 @@ -170,7 +194,20 @@ declare namespace picker { } /** - * AudioPickerViewController Object + * AudioSaveOptions Object + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + */ + interface AudioSaveOptions { + /** + * @type {Array} + * @since 9 + */ + newFileNames?: Array; + } + + /** + * AudioViewPicker Object * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ @@ -179,11 +216,22 @@ declare namespace picker { * Pull up the audio picker based on the selection mode. * * @since 9 - * @syscap SystemCapability.FileManagement.UserFileService - * @param AudioPickerSelectOption represents the options provided in select mode. + * @syscap SystemCapability.FileManagement.UserFileService + * @param AudioSelectOptions represents the options provided in select mode. * @returns {(void | Promise>)} Returns the selector result. */ - select(option: AudioSelectOption) : Promise>; - select(option: AudioSelectOption, callback: AsyncCallback>) : void; + select(option: AudioSelectOptions) : Promise>; + select(option: AudioSelectOptions, callback: AsyncCallback>) : void; + + /** + * Pull up the audio picker based on the save mode. + * + * @since 9 + * @syscap SystemCapability.FileManagement.UserFileService + * @param AudioSaveOptions represents the options provided in save mode. + * @returns {(void | Promise>)} Returns the save result. + */ + save(option: AudioSaveOptions) : Promise>; + save(option: AudioSaveOptions, callback: AsyncCallback>) : void; } } \ No newline at end of file -- Gitee From 13f5331cc14dc8a083caf1303901f43f6cc6e1a8 Mon Sep 17 00:00:00 2001 From: wangminmin Date: Tue, 17 Jan 2023 06:29:29 +0000 Subject: [PATCH 4/7] fix Optional parameter Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts index 42cf0c9d10..6bafee5096 100644 --- a/api/@ohos.file.picker.d.ts +++ b/api/@ohos.file.picker.d.ts @@ -98,8 +98,9 @@ declare namespace picker { * @param PhotoSelectOptions represents the options provided in select mode. * @returns {(void | Promise)} Returns the selector result. */ - select(option: PhotoSelectOptions) : Promise; + select(option?: PhotoSelectOptions) : Promise; select(option: PhotoSelectOptions, callback: AsyncCallback) : void; + select(callback: AsyncCallback) : void; /** * Pull up the photo picker based on the save mode. @@ -109,8 +110,9 @@ declare namespace picker { * @param PhotoSaveOptions represents the options provided in save mode. * @returns {(void | Promise>)} Returns the save result. */ - save(option: PhotoSaveOptions) : Promise>; + save(option?: PhotoSaveOptions) : Promise>; save(option: PhotoSaveOptions, callback: AsyncCallback>) : void; + save(callback: AsyncCallback>) : void; } /** @@ -165,8 +167,9 @@ declare namespace picker { * @param DocumentSelectOptions represents the options provided in select mode. * @returns {(void | Promise>)} Returns the selector result. */ - select(option: DocumentSelectOptions) : Promise>; + select(option?: DocumentSelectOptions) : Promise>; select(option: DocumentSelectOptions, callback: AsyncCallback>) : void; + select(callback: AsyncCallback>) : void; /** * Pull up the document picker based on the save mode. @@ -176,8 +179,9 @@ declare namespace picker { * @param DocumentSaveOptions represents the options provided in save mode. * @returns {(void | Promise>)} Returns the save result. */ - save(option: DocumentSaveOptions) : Promise>; + save(option?: DocumentSaveOptions) : Promise>; save(option: DocumentSaveOptions, callback: AsyncCallback>) : void; + save(callback: AsyncCallback>) : void; } /** @@ -220,8 +224,9 @@ declare namespace picker { * @param AudioSelectOptions represents the options provided in select mode. * @returns {(void | Promise>)} Returns the selector result. */ - select(option: AudioSelectOptions) : Promise>; + select(option?: AudioSelectOptions) : Promise>; select(option: AudioSelectOptions, callback: AsyncCallback>) : void; + select(callback: AsyncCallback>) : void; /** * Pull up the audio picker based on the save mode. @@ -231,7 +236,8 @@ declare namespace picker { * @param AudioSaveOptions represents the options provided in save mode. * @returns {(void | Promise>)} Returns the save result. */ - save(option: AudioSaveOptions) : Promise>; + save(option?: AudioSaveOptions) : Promise>; save(option: AudioSaveOptions, callback: AsyncCallback>) : void; + save(callback: AsyncCallback>) : void; } } \ No newline at end of file -- Gitee From d8967b3fc4ebed1aa5d3495c43e07c985af3f6ed Mon Sep 17 00:00:00 2001 From: wangminmin Date: Tue, 31 Jan 2023 03:00:23 +0000 Subject: [PATCH 5/7] add parameter annotation Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts index 6bafee5096..53d8c8ea2a 100644 --- a/api/@ohos.file.picker.d.ts +++ b/api/@ohos.file.picker.d.ts @@ -40,12 +40,14 @@ declare namespace picker { */ interface PhotoSelectOptions { /** + * The Type of the file in the picker window * @type {PhotoViewMIMETypes} * @since 9 */ MIMEType?: PhotoViewMIMETypes; /** + * Maximum number of single file selected * @type {number} * @since 9 */ @@ -59,12 +61,14 @@ declare namespace picker { */ interface PhotoSelectResult { /** + * the URIs for the selected files * @type {Array} * @since 9 */ photoUris: Array; /** + * Judge whether the selected files are the original image * @type {boolean} * @since 9 */ @@ -78,6 +82,7 @@ declare namespace picker { */ interface PhotoSaveOptions { /** + * The names of the files waiting to be saved * @type {Array} * @since 9 */ @@ -122,18 +127,21 @@ declare namespace picker { */ interface DocumentSelectOptions { /** + * Initialize the default path displayed by the picker window * @type {string} * @since 9 */ defaultFilePathUri?: string; /** + * The Types of the files in the picker window * @type {Array} * @since 9 */ subMIMETypes?: Array; /** + * Maximum number of single file selected * @type {number} * @since 9 */ @@ -147,6 +155,7 @@ declare namespace picker { */ interface DocumentSaveOptions { /** + * The names of the files waiting to be saved * @type {Array} * @since 9 */ @@ -191,6 +200,7 @@ declare namespace picker { */ interface AudioSelectOptions { /** + * Maximum number of single file selected * @type {number} * @since 9 */ @@ -204,6 +214,7 @@ declare namespace picker { */ interface AudioSaveOptions { /** + * The names of the files waiting to be saved * @type {Array} * @since 9 */ -- Gitee From 7ab2126a9d0345b3a44235bf81abc627d617f1c6 Mon Sep 17 00:00:00 2001 From: wangminmin Date: Tue, 31 Jan 2023 07:30:12 +0000 Subject: [PATCH 6/7] add annotation Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 39 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts index 53d8c8ea2a..388a83bc76 100644 --- a/api/@ohos.file.picker.d.ts +++ b/api/@ohos.file.picker.d.ts @@ -121,31 +121,12 @@ declare namespace picker { } /** - * DocumentSelectOptions Object + * DocumentSelectOptions Object. Currently not supported. * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ interface DocumentSelectOptions { - /** - * Initialize the default path displayed by the picker window - * @type {string} - * @since 9 - */ - defaultFilePathUri?: string; - /** - * The Types of the files in the picker window - * @type {Array} - * @since 9 - */ - subMIMETypes?: Array; - - /** - * Maximum number of single file selected - * @type {number} - * @since 9 - */ - maxSelectNumber?: number; } /** @@ -155,7 +136,8 @@ declare namespace picker { */ interface DocumentSaveOptions { /** - * The names of the files waiting to be saved + * The names of the files waiting to be saved. + * Only single file is currently supported. * @type {Array} * @since 9 */ @@ -170,6 +152,7 @@ declare namespace picker { interface DocumentViewPicker { /** * Pull up the document picker based on the selection mode. + * Only single file is currently supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService @@ -182,6 +165,7 @@ declare namespace picker { /** * Pull up the document picker based on the save mode. + * Only single file is currently supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService @@ -194,17 +178,11 @@ declare namespace picker { } /** - * AudioSelectOptions Object + * AudioSelectOptions Object. Currently not supported. * @since 9 * @syscap SystemCapability.FileManagement.UserFileService */ interface AudioSelectOptions { - /** - * Maximum number of single file selected - * @type {number} - * @since 9 - */ - maxSelectNumber?: number; } /** @@ -214,7 +192,8 @@ declare namespace picker { */ interface AudioSaveOptions { /** - * The names of the files waiting to be saved + * The names of the files waiting to be saved. + * Only single file is currently supported. * @type {Array} * @since 9 */ @@ -229,6 +208,7 @@ declare namespace picker { interface AudioViewPicker { /** * Pull up the audio picker based on the selection mode. + * Only single file is currently supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService @@ -241,6 +221,7 @@ declare namespace picker { /** * Pull up the audio picker based on the save mode. + * Only single file is currently supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService -- Gitee From e3fc2bdbe3d56b69940e2ec0f4d4e635fc10a224 Mon Sep 17 00:00:00 2001 From: wangminmin Date: Tue, 31 Jan 2023 07:41:12 +0000 Subject: [PATCH 7/7] fix explannatory Signed-off-by: wangminmin --- api/@ohos.file.picker.d.ts | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/api/@ohos.file.picker.d.ts b/api/@ohos.file.picker.d.ts index 388a83bc76..e9225538ee 100644 --- a/api/@ohos.file.picker.d.ts +++ b/api/@ohos.file.picker.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,7 +16,7 @@ import { AsyncCallback, Callback } from "./basic"; /** - * This module provides the capability to use different types of pickers. + * This module provides the capabilities to use different pickers. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService @@ -40,14 +40,14 @@ declare namespace picker { */ interface PhotoSelectOptions { /** - * The Type of the file in the picker window + * The Type of the file in the picker window. * @type {PhotoViewMIMETypes} * @since 9 */ MIMEType?: PhotoViewMIMETypes; /** - * Maximum number of single file selected + * Maximum number of images for a single selection. * @type {number} * @since 9 */ @@ -61,14 +61,14 @@ declare namespace picker { */ interface PhotoSelectResult { /** - * the URIs for the selected files + * The uris for the selected files. * @type {Array} * @since 9 */ photoUris: Array; /** - * Judge whether the selected files are the original image + * Original option. * @type {boolean} * @since 9 */ @@ -82,7 +82,7 @@ declare namespace picker { */ interface PhotoSaveOptions { /** - * The names of the files waiting to be saved + * The names of the files to be saved. * @type {Array} * @since 9 */ @@ -101,7 +101,7 @@ declare namespace picker { * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @param PhotoSelectOptions represents the options provided in select mode. - * @returns {(void | Promise)} Returns the selector result. + * @returns {(void | Promise)} Returns the uris for the selected files. */ select(option?: PhotoSelectOptions) : Promise; select(option: PhotoSelectOptions, callback: AsyncCallback) : void; @@ -113,7 +113,7 @@ declare namespace picker { * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @param PhotoSaveOptions represents the options provided in save mode. - * @returns {(void | Promise>)} Returns the save result. + * @returns {(void | Promise>)} Returns the uris for the saved files. */ save(option?: PhotoSaveOptions) : Promise>; save(option: PhotoSaveOptions, callback: AsyncCallback>) : void; @@ -126,7 +126,6 @@ declare namespace picker { * @syscap SystemCapability.FileManagement.UserFileService */ interface DocumentSelectOptions { - } /** @@ -136,8 +135,8 @@ declare namespace picker { */ interface DocumentSaveOptions { /** - * The names of the files waiting to be saved. - * Only single file is currently supported. + * The names of the files to be saved. + * Currently, only single file is supported. * @type {Array} * @since 9 */ @@ -152,12 +151,12 @@ declare namespace picker { interface DocumentViewPicker { /** * Pull up the document picker based on the selection mode. - * Only single file is currently supported. + * Currently, only single file is supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @param DocumentSelectOptions represents the options provided in select mode. - * @returns {(void | Promise>)} Returns the selector result. + * @returns {(void | Promise>)} Returns the uris for the selected files. */ select(option?: DocumentSelectOptions) : Promise>; select(option: DocumentSelectOptions, callback: AsyncCallback>) : void; @@ -165,12 +164,12 @@ declare namespace picker { /** * Pull up the document picker based on the save mode. - * Only single file is currently supported. + * Currently, only single file is supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @param DocumentSaveOptions represents the options provided in save mode. - * @returns {(void | Promise>)} Returns the save result. + * @returns {(void | Promise>)} Returns the uris for the saved files. */ save(option?: DocumentSaveOptions) : Promise>; save(option: DocumentSaveOptions, callback: AsyncCallback>) : void; @@ -192,8 +191,8 @@ declare namespace picker { */ interface AudioSaveOptions { /** - * The names of the files waiting to be saved. - * Only single file is currently supported. + * The names of the files to be saved. + * Currently, only single file is supported. * @type {Array} * @since 9 */ @@ -208,12 +207,12 @@ declare namespace picker { interface AudioViewPicker { /** * Pull up the audio picker based on the selection mode. - * Only single file is currently supported. + * Currently, only single file is supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @param AudioSelectOptions represents the options provided in select mode. - * @returns {(void | Promise>)} Returns the selector result. + * @returns {(void | Promise>)} Returns the uris for the selected files. */ select(option?: AudioSelectOptions) : Promise>; select(option: AudioSelectOptions, callback: AsyncCallback>) : void; @@ -221,12 +220,12 @@ declare namespace picker { /** * Pull up the audio picker based on the save mode. - * Only single file is currently supported. + * Currently, only single file is supported. * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService * @param AudioSaveOptions represents the options provided in save mode. - * @returns {(void | Promise>)} Returns the save result. + * @returns {(void | Promise>)} Returns the uris for the saved files. */ save(option?: AudioSaveOptions) : Promise>; save(option: AudioSaveOptions, callback: AsyncCallback>) : void; -- Gitee