diff --git a/api/@ohos.filemanagement.userFileManager.d.ts b/api/@ohos.filemanagement.userFileManager.d.ts index 2789f8774165a819d43374167b8b581a4c4ecbbf..d141676249ae582a3d8b59d27b8d26b44c15352f 100644 --- a/api/@ohos.filemanagement.userFileManager.d.ts +++ b/api/@ohos.filemanagement.userFileManager.d.ts @@ -23,7 +23,6 @@ import dataSharePredicates from './@ohos.data.dataSharePredicates'; * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @import Import userFileManager from '@ohos.filemanagement.userFileManager' */ declare namespace userFileManager { /** @@ -33,7 +32,7 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @StageModelOnly * @param context Hap context information - * @return Instance of UserFileManager + * @returns Instance of UserFileManager */ function getUserFileMgr(context: Context): UserFileManager; @@ -86,7 +85,6 @@ declare namespace userFileManager { * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @import Import userFileManager from '@ohos.filemanagement.userFileManager' */ interface FileAsset { /** @@ -111,7 +109,7 @@ declare namespace userFileManager { */ displayName: string; /** - * Return the fileasset member parameter. + * Return the fileAsset member parameter. * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core @@ -119,7 +117,7 @@ declare namespace userFileManager { */ get(member: string): MemberType; /** - * Set the fileasset member parameter. + * Set the fileAsset member parameter. * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core @@ -187,7 +185,7 @@ declare namespace userFileManager { * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO or ohos.permission.READ_AUDIO - * @param callback Callback used to return the thumbnail's pixelmap. + * @param callback Callback used to return the thumbnail's pixelMap. */ getThumbnail(callback: AsyncCallback): void; /** @@ -197,7 +195,7 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO or ohos.permission.READ_AUDIO * @param size Thumbnail's size - * @param callback Callback used to return the thumbnail's pixelmap. + * @param callback Callback used to return the thumbnail's pixelMap. */ getThumbnail(size: image.Size, callback: AsyncCallback): void; /** @@ -486,7 +484,6 @@ declare namespace userFileManager { * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @import Import userFileManager from '@ohos.filemanagement.userFileManager' */ interface FetchResult { /** @@ -494,7 +491,7 @@ declare namespace userFileManager { * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @return Total number of files. + * @returns Total number of files. */ getCount(): number; /** @@ -502,9 +499,9 @@ declare namespace userFileManager { * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @return Whether the file is the last one. + * @returns Whether the file is the last one. * You need to check whether the file is the last one before calling getNextObject, - * which returns the next file only when True is returned for this method. + * which returns the next file only when False is returned for this method. */ isAfterLast(): boolean; /** @@ -527,14 +524,14 @@ declare namespace userFileManager { * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @return A Promise instance used to return the file in the format of a T instance. + * @returns A Promise instance used to return the file in the format of a T instance. */ getFirstObject(): Promise; /** * Obtains the next T in the file retrieval result. * This method uses a callback to return the file. * Before calling this method, you must use isAfterLast() to check whether the result set points to the last row. - * This method returns the next file only when True is returned for isAfterLast(). + * This method returns the next file only when False is returned for isAfterLast(). * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core @@ -545,11 +542,11 @@ declare namespace userFileManager { * Obtains the next T in the file retrieval result. * This method uses a promise to return the file. * Before calling this method, you must use isAfterLast() to check whether the result set points to the last row. - * This method returns the next file only when True is returned for isAfterLast(). + * This method returns the next file only when False is returned for isAfterLast(). * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @return A Promise instance used to return the file in the format of a T instance. + * @returns A Promise instance used to return the file in the format of a T instance. */ getNextObject(): Promise; /** @@ -565,7 +562,7 @@ declare namespace userFileManager { * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core - * @return A Promise instance used to return the file in the format of a T instance. + * @returns A Promise instance used to return the file in the format of a T instance. */ getLastObject(): Promise; /** @@ -587,7 +584,7 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @param index Index of the file to obtain. * @throws {BusinessError} 13900020 - if type index is not number - * @return A Promise instance used to return the file in the format of a T instance. + * @returns A Promise instance used to return the file in the format of a T instance. */ getPositionObject(index: number): Promise; } @@ -641,7 +638,7 @@ declare namespace userFileManager { * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO - * @param type Detemined which kinds of asset to retrive. + * @param type Determined which kinds of asset to retrive. * @param options Retrieval options. * @throws {BusinessError} 13900020 - if type options is not FetchOptions * @param callback Callback used to return the files in the format of a FetchResult instance. @@ -653,10 +650,10 @@ declare namespace userFileManager { * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO - * @param type Detemined which kinds of asset to retrive. + * @param type Determined which kinds of asset to retrive. * @param options Retrieval options. * @throws {BusinessError} 13900020 - if type options is not FetchOptions - * @return A Promise instance used to return the files in the format of a FetchResult instance. + * @returns A Promise instance used to return the files in the format of a FetchResult instance. */ getPhotoAssets(options: FetchOptions): Promise>; } @@ -713,10 +710,10 @@ declare namespace userFileManager { * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO - * @param type Detemined which kinds of asset to retrive. + * @param type Determined which kinds of asset to retrive. * @param options Retrieval options. * @throws {BusinessError} 13900020 - if type options is not FetchOptions - * @return A promise instance used to return the files in the format of a FetchResult instance + * @returns A promise instance used to return the files in the format of a FetchResult instance */ getPhotoAssets(options: FetchOptions): Promise>; /** @@ -750,7 +747,7 @@ declare namespace userFileManager { * @permission ohos.permission.WRITE_IMAGEVIDEO * @param displayName File name * @param albumUri Album uri is optional, asset will put into the default album without albumUri - * @return A Promise instance used to return the FileAsset + * @returns A Promise instance used to return the FileAsset * @throws {BusinessError} 13900020 - if type displayName or albumUri is not string * @systemapi * @since 9 @@ -774,7 +771,7 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO * @param options Retrieval options. - * @return A Promise instance used to return an album array. + * @returns A Promise instance used to return an album array. * @throws {BusinessError} 13900020 - if type options is not AlbumFetchOptions */ getPhotoAlbums(options: AlbumFetchOptions): Promise>; @@ -794,7 +791,7 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO * @param type Private album type - * @return A Promise instance used to return a private album FetchResult. + * @returns A Promise instance used to return a private album FetchResult. * @throws {BusinessError} 13900020 - if type type is not PrivateAlbumType * @systemapi * @since 9 @@ -817,10 +814,10 @@ declare namespace userFileManager { * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_AUDIO - * @param type Detemined which kinds of asset to retrive. + * @param type Determined which kinds of asset to retrive. * @param options Retrieval options. * @throws {BusinessError} 13900020 - if type options is not FetchOptions - * @return A promise instance used to return the files in the format of a FetchResult instance + * @returns A promise instance used to return the files in the format of a FetchResult instance */ getAudioAssets(options: FetchOptions): Promise>; /** @@ -841,12 +838,12 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.WRITE_IMAGEVIDEO or ohos.permission.READ_AUDIO and ohos.permission.WRITE_AUDIO * @param uri Uri of asset - * @return A Promise instance, no value returned + * @returns A Promise instance, no value returned * @throws {BusinessError} 13900020 - if type uri is not string */ delete(uri: string): Promise; /** - * Turn on mornitor the data changes + * Turn on monitor the data changes * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core @@ -855,7 +852,7 @@ declare namespace userFileManager { */ on(type: ChangeEvent, callback: Callback): void; /** - * Turn off mornitor the data changes + * Turn off monitor the data changes * @since 9 * @systemapi * @syscap SystemCapability.FileManagement.UserFileManager.Core @@ -876,7 +873,7 @@ declare namespace userFileManager { * @since 9 * @syscap SystemCapability.FileManagement.UserFileManager.DistributedCore * @systemapi - * @return Promise used to return the list of the active peer devices' information + * @returns Promise used to return the list of the active peer devices' information */ getActivePeers(): Promise>; /** @@ -892,7 +889,7 @@ declare namespace userFileManager { * @since 9 * @syscap SystemCapability.FileManagement.UserFileManager.DistributedCore * @systemapi - * @return Promise used to return the list of the all the peer devices' information + * @returns Promise used to return the list of the all the peer devices' information */ getAllPeers(): Promise>; /** @@ -989,7 +986,7 @@ declare namespace userFileManager { * @syscap SystemCapability.FileManagement.UserFileManager.Core * @param uri Uri of asset * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.WRITE_IMAGEVIDEO or ohos.permission.READ_AUDIO and ohos.permission.WRITE_AUDIO - * @return A Promise instance, no value returned + * @returns A Promise instance, no value returned * @systemapi */ delete(uri: string): Promise; @@ -1009,11 +1006,11 @@ declare namespace userFileManager { * @param uri Uri of asset * @syscap SystemCapability.FileManagement.UserFileManager.Core * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.WRITE_IMAGEVIDEO or ohos.permission.READ_AUDIO and ohos.permission.WRITE_AUDIO - * @return A Promise instance, no value returned + * @returns A Promise instance, no value returned * @systemapi */ recover(uri: string): Promise; } } -export default userFileManager; \ No newline at end of file +export default userFileManager; diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts index 18699d7b4580d625c4160d3ad8876a5dac987046..935f502c28328ca957162e464d205ece09b5781f 100644 --- a/api/@ohos.multimedia.mediaLibrary.d.ts +++ b/api/@ohos.multimedia.mediaLibrary.d.ts @@ -21,16 +21,14 @@ import image from './@ohos.multimedia.image'; * @name mediaLibrary * @since 6 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @import import media from '@ohos.multimedia.mediaLibrary' */ declare namespace mediaLibrary { /** * Obtains a MediaLibrary instance. * @since 6 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' * @FAModelOnly - * @return Returns a MediaLibrary instance if the operation is successful; returns null otherwise. + * @returns Returns a MediaLibrary instance if the operation is successful; returns null otherwise. */ function getMediaLibrary(): MediaLibrary; /** @@ -39,7 +37,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @StageModelOnly * @param context hap context information - * @return Instance of MediaLibrary + * @returns Instance of MediaLibrary */ function getMediaLibrary(context: Context): MediaLibrary; @@ -79,7 +77,6 @@ declare namespace mediaLibrary { * Describes media resource options. * @since 6 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' * @deprecated since 9 */ interface MediaAssetOption { @@ -110,7 +107,6 @@ declare namespace mediaLibrary { * Describes media selection options. * @since 6 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' * @deprecated since 9 */ interface MediaSelectOption { @@ -134,7 +130,6 @@ declare namespace mediaLibrary { * Provides methods to encapsulate file attributes. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' */ interface FileAsset { /** @@ -270,7 +265,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA - * @param callback Callback return the result of isDerectory. + * @param callback Callback return the result of isDirectory. */ isDirectory(callback: AsyncCallback): void; /** @@ -359,7 +354,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA and ohos.permission.WRITE_MEDIA - * @param isFavorite ture is favorite file, false is not favorite file + * @param isFavorite true is favorite file, false is not favorite file * @param callback Callback used to return, No value is returned. */ favorite(isFavorite: boolean, callback: AsyncCallback): void; @@ -368,7 +363,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA and ohos.permission.WRITE_MEDIA - * @param isFavorite ture is favorite file, false is not favorite file + * @param isFavorite true is favorite file, false is not favorite file */ favorite(isFavorite: boolean): Promise; /** @@ -561,7 +556,7 @@ declare namespace mediaLibrary { */ selectionArgs: Array; /** - * Sorting criterion of the retrieval results, for example, order: "datetaken DESC,display_name DESC, file_id DESC". + * Sorting criterion of the retrieval results, for example, order: "dateTaken DESC,display_name DESC, file_id DESC". * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core */ @@ -590,23 +585,22 @@ declare namespace mediaLibrary { * Implements file retrieval. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' */ interface FetchFileResult { /** * Obtains the total number of files in the file retrieval result. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @return Total number of files. + * @returns Total number of files. */ getCount(): number; /** * Checks whether the result set points to the last row. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @return Whether the file is the last one. + * @returns Whether the file is the last one. * You need to check whether the file is the last one before calling getNextObject, - * which returns the next file only when True is returned for this method. + * which returns the next file only when False is returned for this method. */ isAfterLast(): boolean; /** @@ -626,14 +620,14 @@ declare namespace mediaLibrary { * Obtains the first FileAsset in the file retrieval result. This method uses a promise to return the file. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @return A Promise instance used to return the file in the format of a FileAsset instance. + * @returns A Promise instance used to return the file in the format of a FileAsset instance. */ getFirstObject(): Promise; /** * Obtains the next FileAsset in the file retrieval result. * This method uses a callback to return the file. * Before calling this method, you must use isAfterLast() to check whether the result set points to the last row. - * This method returns the next file only when True is returned for isAfterLast(). + * This method returns the next file only when False is returned for isAfterLast(). * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param callback Callback used to return the file in the format of a FileAsset instance. @@ -643,10 +637,10 @@ declare namespace mediaLibrary { * Obtains the next FileAsset in the file retrieval result. * This method uses a promise to return the file. * Before calling this method, you must use isAfterLast() to check whether the result set points to the last row. - * This method returns the next file only when True is returned for isAfterLast(). + * This method returns the next file only when False is returned for isAfterLast(). * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @return A Promise instance used to return the file in the format of a FileAsset instance. + * @returns A Promise instance used to return the file in the format of a FileAsset instance. */ getNextObject(): Promise; /** @@ -660,7 +654,7 @@ declare namespace mediaLibrary { * Obtains the last FileAsset in the file retrieval result. This method uses a promise to return the file. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @return A Promise instance used to return the file in the format of a FileAsset instance. + * @returns A Promise instance used to return the file in the format of a FileAsset instance. */ getLastObject(): Promise; /** @@ -678,7 +672,7 @@ declare namespace mediaLibrary { * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param index Index of the file to obtain. - * @return A Promise instance used to return the file in the format of a FileAsset instance. + * @returns A Promise instance used to return the file in the format of a FileAsset instance. */ getPositionObject(index: number): Promise; /** @@ -698,7 +692,7 @@ declare namespace mediaLibrary { * In this case, other methods cannot be called. * @since 7 * @syscap SystemCapability.Multimedia.MediaLibrary.Core - * @return A Promise instance used to return a FileAsset array. + * @returns A Promise instance used to return a FileAsset array. */ getAllObject(): Promise>; } @@ -791,7 +785,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA * @param option Media retrieval options. - * @return A Promise instance used to return the files in the format of a FetchFileResult instance. + * @returns A Promise instance used to return the files in the format of a FetchFileResult instance. */ getFileAssets(options?: MediaFetchOptions): Promise; } @@ -860,7 +854,7 @@ declare namespace mediaLibrary { * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param type public directory predefined in DirectoryType. - * @return A promise instance used to return the public directory in the format of string + * @returns A promise instance used to return the public directory in the format of string */ getPublicDirectory(type: DirectoryType): Promise; /** @@ -880,11 +874,11 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA * @param options Media retrieval options. - * @return A promise instance used to return the files in the format of a FetchFileResult instance + * @returns A promise instance used to return the files in the format of a FetchFileResult instance */ getFileAssets(options: MediaFetchOptions): Promise; /** - * Turn on mornitor the data changes by media type + * Turn on monitor the data changes by media type * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param type one of 'deviceChange','albumChange','imageChange','audioChange','videoChange','fileChange','remoteFileChange' @@ -892,7 +886,7 @@ declare namespace mediaLibrary { */ on(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'|'fileChange'|'remoteFileChange', callback: Callback): void; /** - * Turn off mornitor the data changes by media type + * Turn off monitor the data changes by media type * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param type one of 'deviceChange','albumChange','imageChange','audioChange','videoChange','fileChange','remoteFileChange' @@ -918,7 +912,7 @@ declare namespace mediaLibrary { * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE * @param displayName file name * @param relativePath relative path - * @return A Promise instance used to return the FileAsset + * @returns A Promise instance used to return the FileAsset */ createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise; /** @@ -937,7 +931,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA and ohos.permission.WRITE_MEDIA * @param uri, FileAsset's URI - * @return A Promise instance, no value returned + * @returns A Promise instance, no value returned * @systemapi */ deleteAsset(uri: string): Promise; @@ -956,7 +950,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @permission ohos.permission.READ_MEDIA * @param option Media retrieval options. - * @return A Promise instance used to return an album array. + * @returns A Promise instance used to return an album array. */ getAlbums(options: MediaFetchOptions): Promise>; /** @@ -974,7 +968,7 @@ declare namespace mediaLibrary { * @since 6 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param option Media resource option. - * @return Promise used to return the URI that stores the media resources. + * @returns Promise used to return the URI that stores the media resources. * @deprecated since 9 */ storeMediaAsset(option: MediaAssetOption): Promise; @@ -1005,7 +999,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param images List of images to preview. * @param index Sequence number of the first image to preview. - * @return Promise used to return whether the operation is successful. + * @returns Promise used to return whether the operation is successful. * @deprecated since 9 */ startImagePreview(images: Array, index?: number): Promise; @@ -1025,7 +1019,7 @@ declare namespace mediaLibrary { * @since 6 * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @param option Media selection option. - * @return Promise used to return the list of URIs that store the selected media resources. + * @returns Promise used to return the list of URIs that store the selected media resources. * @deprecated since 9 */ startMediaSelect(option: MediaSelectOption): Promise>; @@ -1044,7 +1038,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore * @permission ohos.permission.READ_MEDIA * @systemapi - * @return Promise used to return the list of the active peer devices' information + * @returns Promise used to return the list of the active peer devices' information */ getActivePeers(): Promise>; /** @@ -1062,7 +1056,7 @@ declare namespace mediaLibrary { * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore * @permission ohos.permission.READ_MEDIA * @systemapi - * @return Promise used to return the list of the all the peer devices' information + * @returns Promise used to return the list of the all the peer devices' information */ getAllPeers(): Promise>; /** @@ -1081,7 +1075,7 @@ declare namespace mediaLibrary { } /** - * thumbnail's size which have width and heigh + * thumbnail's size which have width and height * @syscap SystemCapability.Multimedia.MediaLibrary.Core * @since 8 */ @@ -1145,7 +1139,7 @@ declare namespace mediaLibrary { */ enum DeviceType { /** - * Unknow device type + * Unknown device type * @since 8 * @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore * @systemapi