diff --git a/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md b/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md index 83ef26bc388d5e10d04e3fd434cd2d2a74f89c3b..5d0c4daf3318cd1e12688451b286a4b314d201a8 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md +++ b/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md @@ -15,9 +15,9 @@ function getMediaLibrary(context: Context): MediaLibrary; 获取媒体库。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -46,9 +46,9 @@ getFileAssets(options: MediaFetchOptions, callback: AsyncCallback<FetchFileRe 获取文件资源,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -70,9 +70,9 @@ getFileAssets(options: MediaFetchOptions): Promise<FetchFileResult>; 获取文件资源,使用Promise方式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -102,9 +102,9 @@ on(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'| 打开媒体文件变更和上线通知,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -126,9 +126,9 @@ off(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange' 关闭媒体文件变更和设备上线通知,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -151,9 +151,9 @@ createAsset(mediaType: MediaType, displayName: string, relativePath: string, cal 创建媒体资源,使用callback方式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -178,9 +178,9 @@ createAsset(mediaType: MediaType, displayName: string, relativePath: string): Pr 创建媒体资源,使用Promise方式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -212,9 +212,9 @@ deleteAsset(uri: string, callback: AsyncCallback<void>): void; 删除媒体资源,使用callback方式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -237,9 +237,9 @@ deleteAsset(uri: string): Promise<void>; 删除媒体资源,使用promise方式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -269,9 +269,9 @@ getAlbums(options: MediaFetchOptions, callback: AsyncCallback; 获取实体相册,使用 promise 方式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -324,9 +324,9 @@ getActivePeers(callback: AsyncCallback): void; 获取活动对端设备 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.DistributedCore +**系统能力**:SystemCapability.Multimedia.MediaLibrary.DistributedCore **参数:** @@ -348,9 +348,9 @@ getActivePeers(): Promise; 获取活动对端设备 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.DistributedCore +**系统能力**:SystemCapability.Multimedia.MediaLibrary.DistributedCore **参数:** @@ -372,9 +372,9 @@ getAllPeers(callback: AsyncCallback): void; 获取所有对端设备 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.DistributedCore +**系统能力**:SystemCapability.Multimedia.MediaLibrary.DistributedCore **参数:** @@ -396,9 +396,9 @@ getAllPeers(): Promise; 获取所有对端设备 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.DistributedCore +**系统能力**:SystemCapability.Multimedia.MediaLibrary.DistributedCore **返回值:** @@ -416,9 +416,9 @@ release(callback: AsyncCallback<void>): void; 释放MediaLibrary实例 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -440,9 +440,9 @@ release(): Promise<void>; 释放MediaLibrary实例 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值:** @@ -462,9 +462,9 @@ isDirectory(callback: AsyncCallback<boolean>): void; 判断fileAsset是否为目录,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -486,9 +486,9 @@ isDirectory():Promise<boolean>; 判断fileAsset是否为目录,使用Promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值:** @@ -512,9 +512,9 @@ commitModify(callback: AsyncCallback<void>): void; 修改文件的元数据,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -536,9 +536,9 @@ commitModify(): Promise<void>; 修改文件的元数据,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值:** @@ -561,9 +561,9 @@ open(mode: string, callback: AsyncCallback<number>): void; 打开当前文件,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数** @@ -586,9 +586,9 @@ open(mode: string): Promise<number>; 打开当前文件,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -616,9 +616,9 @@ close(fd: number, callback: AsyncCallback<void>): void; 关闭当前文件,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -641,9 +641,9 @@ close(fd: number): Promise<void>; 关闭当前文件,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -671,9 +671,9 @@ getThumbnail(callback: AsyncCallback<image.PixelMap>): void; 获取文件的缩略图,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -695,9 +695,9 @@ getThumbnail(size: Size, callback: AsyncCallback<image.PixelMap>): void; 获取文件的缩略图,传入缩略图尺寸,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -720,9 +720,9 @@ getThumbnail(size?: Size): Promise<image.PixelMap>; 获取文件的缩略图,传入缩略图尺寸,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -750,9 +750,9 @@ favorite(isFavorite: boolean, callback: AsyncCallback<void>): void; 将文件设置为收藏文件,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -775,9 +775,9 @@ favorite(isFavorite: boolean): Promise<void>; 将文件设置为收藏文件,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -807,9 +807,9 @@ isFavorite(callback: AsyncCallback<boolean>): void; 判断该文件是否为收藏文件,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -831,9 +831,9 @@ isFavorite():Promise<boolean>; 判断该文件是否为收藏文件,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值:** @@ -857,9 +857,9 @@ trash(isTrash: boolean, callback: AsyncCallback<void&g;): void; 当文件被定位时,将文件放到垃圾文件夹,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -882,9 +882,9 @@ trash(isTrash: boolean,): Promise<void>; 当文件被定位时,将文件放到垃圾文件夹,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -914,9 +914,9 @@ isTrash(callback: AsyncCallback<boolean>): void; 当文件被定位,判断文件是否为垃圾文件,使用callback方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数:** @@ -938,9 +938,9 @@ isTrash():Promise<boolean>; 当文件被定位,设置文件为垃圾文件,使用promise方式返回异步结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值:** @@ -968,9 +968,9 @@ getCount(): number; 获取文件检索结果中的文件总数。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -990,9 +990,9 @@ isAfterLast(): boolean; 检查结果集是否指向最后一行。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -1012,9 +1012,9 @@ close(): void; 释放 FetchFileResult 实例并使其失效。无法调用其他方法。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **示例**: @@ -1028,9 +1028,9 @@ getFirstObject(callback: AsyncCallback<FileAsset>): void; 获取文件检索结果中的第一个文件资产。此方法使用回调返回FileAsset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1056,9 +1056,9 @@ getFirstObject(): Promise<FileAsset>; 获取文件检索结果中的第一个文件资产。此方法使用返回FileAsset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -1083,9 +1083,9 @@ queryResultSet_.getFirstObject().then(function(fileAsset){ 获取文件检索结果中的下一个文件资产。此方法使用callback形式返回结果。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1111,9 +1111,9 @@ data.getNextObject((err, value) => { 获取文件检索结果中的下一个文件资产。此方法使用promise方式来异步返回FileAsset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -1133,9 +1133,9 @@ getLastObject(callback: AsyncCallback<FileAsset>): void; 获取文件检索结果中的最后一个文件资产。此方法使用callback回调来返回FileAsset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1161,9 +1161,9 @@ getLastObject(): Promise<FileAsset>; 获取文件检索结果中的最后一个文件资产。此方法使用Promise方式来返回FileAsset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -1183,9 +1183,9 @@ getPositionObject(index: number, callback: AsyncCallback<FileAsset>): void 获取文件检索结果中具有指定索引的文件资产。此方法使用回调来返回FileAsset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1212,9 +1212,9 @@ getPositionObject(index: number): Promise<FileAsset>; 获取文件检索结果中具有指定索引的文件资产。此方法使用Promise形式返回文件Asset。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1246,9 +1246,9 @@ getAllObject(callback: AsyncCallback<Array<FileAsset>>): void; 获取文件检索结果中的所有文件资产。此方法使用Callback回调来返回FileAsset结果集。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1274,9 +1274,9 @@ getAllObject(): Promise<Array<FileAsset>>; 获取文件检索结果中的所有文件资产。此方法使用Promise来返回FileAsset结果集。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -1296,9 +1296,9 @@ commitModify(callback: AsyncCallback<void>): void; 更新相册属性修改到数据库中。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1325,9 +1325,9 @@ commitModify(): Promise<void>; 更新相册属性修改到数据库中。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **返回值**: @@ -1352,9 +1352,9 @@ getFileAssets(options: MediaFetchOptions, callback: AsyncCallback<FetchFileRe 按照检索条件获取相册中的文件。此方法使用Callback回调来返回文件结果集。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: @@ -1379,9 +1379,9 @@ function getFileAssetsCallBack(err, fetchFileResult) { 按照检索条件获取相册中的文件。此方法使用异步回调来返回文件结果集。 -**需要权限:**ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE +**需要权限**:ohos.permission.MEDIA_LOCATION,ohos.permission.MEDIA_READ,ohos.permission.MEDIA_WRITE -**系统能力:**SystemCapability.Multimedia.MediaLibrary.Core +**系统能力**:SystemCapability.Multimedia.MediaLibrary.Core **参数**: