未验证 提交 c7dd3312 编写于 作者: O openharmony_ci 提交者: Gitee

!14967 [翻译完成】#I6D82B

Merge pull request !14967 from Annie_wang/PR14240
...@@ -17,7 +17,7 @@ import fileAccess from '@ohos.file.fileAccess'; ...@@ -17,7 +17,7 @@ import fileAccess from '@ohos.file.fileAccess';
getFileAccessAbilityInfo( ) : Promise<Array<Want>> getFileAccessAbilityInfo( ) : Promise<Array<Want>>
Obtains information about all wants with **extension** set to **fileAcesss** in the system. A want is a basic communication component used to start services. This API uses a promise to return the result. Obtains information about all wants with **extension** set to **fileAccess** in the system. A want is a basic communication component used to start services. This API uses a promise to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -25,9 +25,9 @@ Obtains information about all wants with **extension** set to **fileAcesss** in ...@@ -25,9 +25,9 @@ Obtains information about all wants with **extension** set to **fileAcesss** in
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| Promise<Array<Want>> | Promise used to return the **want** information obtained.| | Promise<Array<Want>> | Promise used to return the **want** information obtained.|
**Example** **Example**
...@@ -47,7 +47,7 @@ Obtains information about all wants with **extension** set to **fileAcesss** in ...@@ -47,7 +47,7 @@ Obtains information about all wants with **extension** set to **fileAcesss** in
getFileAccessAbilityInfo(callback: AsyncCallback<Array<Want>>): void; getFileAccessAbilityInfo(callback: AsyncCallback<Array<Want>>): void;
Obtains information about all wants with **extension** set to **fileAcesss** in the system. A want is a basic communication component used to start services. This API uses an asynchronous callback to return the result. Obtains information about all wants with **extension** set to **fileAccess** in the system. A want is a basic communication component used to start services. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -55,9 +55,9 @@ Obtains information about all wants with **extension** set to **fileAcesss** in ...@@ -55,9 +55,9 @@ Obtains information about all wants with **extension** set to **fileAcesss** in
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| callback | AsyncCallback<Array<Want>> | Yes| Promise used to return the **want** information obtained.| | callback | AsyncCallback<Array<Want>> | Yes| Promise used to return the **want** information obtained.|
**Example** **Example**
...@@ -89,16 +89,16 @@ Synchronously creates a **Helper** object to connect to the specified wants. The ...@@ -89,16 +89,16 @@ Synchronously creates a **Helper** object to connect to the specified wants. The
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| context | Context | Yes| Context of the ability.| | context | Context | Yes| Context of the ability.|
| wants | Array<Want> | Yes| Wants to connect.| | wants | Array<Want> | Yes| Wants to connect.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| FileAccessHelper | **Helper** object created.| | FileAccessHelper | **Helper** object created.|
**Example** **Example**
...@@ -114,7 +114,7 @@ Synchronously creates a **Helper** object to connect to the specified wants. The ...@@ -114,7 +114,7 @@ Synchronously creates a **Helper** object to connect to the specified wants. The
}, },
] ]
try { try {
// this.context is passed by MainAbility. // this.context is passed by EntryAbility.
fileAccessHelper = fileAccess.createFileAccessHelper(this.context, wantInfos); fileAccessHelper = fileAccess.createFileAccessHelper(this.context, wantInfos);
if (!fileAccessHelper) if (!fileAccessHelper)
console.error("createFileAccessHelper interface returns an undefined object"); console.error("createFileAccessHelper interface returns an undefined object");
...@@ -136,15 +136,15 @@ Synchronously creates a **Helper** object to connect to all file management serv ...@@ -136,15 +136,15 @@ Synchronously creates a **Helper** object to connect to all file management serv
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| context | Context | Yes| Context of the ability.| | context | Context | Yes| Context of the ability.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| FileAccessHelper | **Helper** object created.| | FileAccessHelper | **Helper** object created.|
**Example** **Example**
...@@ -153,7 +153,7 @@ Synchronously creates a **Helper** object to connect to all file management serv ...@@ -153,7 +153,7 @@ Synchronously creates a **Helper** object to connect to all file management serv
let fileAccesssHelperAllServer = null; let fileAccesssHelperAllServer = null;
// Create a Helper object to interact with all file management services configured with fileAccess in the system. // Create a Helper object to interact with all file management services configured with fileAccess in the system.
try { try {
// this.context is passed by MainAbility. // this.context is passed by EntryAbility.
fileAccesssHelperAllServer = fileAccess.createFileAccessHelper(this.context); fileAccesssHelperAllServer = fileAccess.createFileAccessHelper(this.context);
if (!fileAccesssHelperAllServer) if (!fileAccesssHelperAllServer)
console.error("createFileAccessHelper interface returns an undefined object"); console.error("createFileAccessHelper interface returns an undefined object");
...@@ -167,8 +167,7 @@ Synchronously creates a **Helper** object to connect to all file management serv ...@@ -167,8 +167,7 @@ Synchronously creates a **Helper** object to connect to all file management serv
getRoots( ) : Promise<RootIterator> getRoots( ) : Promise<RootIterator>
Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses a promise to return a **RootIterator** object, which Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses a promise to return a **RootIterator** object, which returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -176,9 +175,9 @@ returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext). ...@@ -176,9 +175,9 @@ returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| Promise<RootIterator> | Promise used to return the **RootIterator** object obtained.| | Promise<RootIterator> | Promise used to return the **RootIterator** object obtained.|
**Example** **Example**
...@@ -211,8 +210,7 @@ returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext). ...@@ -211,8 +210,7 @@ returns [RootInfo](#rootinfo) by using [next()](#rootiteratornext).
getRoots(callback:AsyncCallback<RootIterator>) : void; getRoots(callback:AsyncCallback<RootIterator>) : void;
Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses an asynchronous callback to return the result. Obtains information about the device root nodes of the file management service type connected to the **Helper** object. This API uses an asynchronous callback to return the result. The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo) through [next()](#rootiteratornext).
The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo) through [next()](#rootiteratornext).
**System capability**: SystemCapability.FileManagement.UserFileService **System capability**: SystemCapability.FileManagement.UserFileService
...@@ -220,9 +218,9 @@ The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo) ...@@ -220,9 +218,9 @@ The callback has a **RootIterator** object, which returns [RootInfo](#rootinfo)
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| callback | AsyncCallback<RootIterator> | Yes| Promise used to return the **RootIterator** object obtained.| | callback | AsyncCallback<RootIterator> | Yes| Promise used to return the **RootIterator** object obtained.|
**Example** **Example**
...@@ -263,16 +261,16 @@ Synchronously obtains the **FileIterator** object of the first-level files (file ...@@ -263,16 +261,16 @@ Synchronously obtains the **FileIterator** object of the first-level files (file
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | -- | -- | | --- | --- | -- | -- |
| filter | Filter | No| **Filter** object. | | filter | Filter | No| **Filter** object. |
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| FileIterator | **FileIterator** object obtained.| | FileIterator | **FileIterator** object obtained.|
**Example** **Example**
...@@ -314,15 +312,15 @@ Recursively obtains the **FileIterator** object of the files matching the condit ...@@ -314,15 +312,15 @@ Recursively obtains the **FileIterator** object of the files matching the condit
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | -- | -- | | --- | --- | -- | -- |
| filter | Filter | No| **Filter** object. | | filter | Filter | No| **Filter** object. |
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| FileIterator | **FileIterator** object obtained.| | FileIterator | **FileIterator** object obtained.|
**Example** **Example**
...@@ -364,15 +362,15 @@ Synchronously obtains the **FileIterator** object of the next-level files (file ...@@ -364,15 +362,15 @@ Synchronously obtains the **FileIterator** object of the next-level files (file
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | -- | -- | | --- | --- | -- | -- |
| filter | Filter | No| **Filter** object. | | filter | Filter | No| **Filter** object. |
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| FileIterator | **FileIterator** object obtained.| | FileIterator | **FileIterator** object obtained.|
**Example** **Example**
...@@ -414,16 +412,16 @@ Recursively obtains the **FileIterator** object of the files matching the condit ...@@ -414,16 +412,16 @@ Recursively obtains the **FileIterator** object of the files matching the condit
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | -- | -- | | --- | --- | -- | -- |
| filter | Filter | No| **Filter** object. | | filter | Filter | No| **Filter** object. |
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| FileIterator | **FileIterator** object obtained.| | FileIterator | **FileIterator** object obtained.|
**Example** **Example**
...@@ -465,10 +463,10 @@ Creates a file in a directory. This API uses a promise to return the result. ...@@ -465,10 +463,10 @@ Creates a file in a directory. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the parent directory for the file to create.| | uri | string | Yes| URI of the parent directory for the file to create.|
| displayName | string | Yes| Name of the file to create. By default, the name of a local file must contain the file name extension.| | displayName | string | Yes| Name of the file to create. By default, the name of a local file must contain the file name extension.|
**Return value** **Return value**
...@@ -510,11 +508,11 @@ Creates a file in a directory. This API uses an asynchronous callback to return ...@@ -510,11 +508,11 @@ Creates a file in a directory. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the parent directory for the file to create.| | uri | string | Yes| URI of the parent directory for the file to create.|
| displayName | string | Yes| Name of the file to create. By default, the name of a local file must contain the file name extension.| | displayName | string | Yes| Name of the file to create. By default, the name of a local file must contain the file name extension.|
| callback | AsyncCallback<string> | Yes| Promise used to return the URI of the file created.| | callback | AsyncCallback<string> | Yes| Promise used to return the URI of the file created.|
**Example** **Example**
...@@ -550,10 +548,10 @@ Creates a folder in a directory. This API uses a promise to return the result. ...@@ -550,10 +548,10 @@ Creates a folder in a directory. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| parentUri | string | Yes| URI of the parent directory for the folder to create.| | parentUri | string | Yes| URI of the parent directory for the folder to create.|
| displayName | string | Yes| Name of the folder to create.| | displayName | string | Yes| Name of the folder to create.|
**Return value** **Return value**
...@@ -595,11 +593,11 @@ Creates a folder in a directory. This API uses an asynchronous callback to retur ...@@ -595,11 +593,11 @@ Creates a folder in a directory. This API uses an asynchronous callback to retur
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| parentUri | string | Yes| URI of the parent directory for the folder to create.| | parentUri | string | Yes| URI of the parent directory for the folder to create.|
| displayName | string | Yes| Name of the folder to create.| | displayName | string | Yes| Name of the folder to create.|
| callback | AsyncCallback<string> | Yes| Promise used to return the URI of the folder created.| | callback | AsyncCallback<string> | Yes| Promise used to return the URI of the folder created.|
**Example** **Example**
...@@ -635,16 +633,16 @@ Opens a file. This API uses a promise to return the result. ...@@ -635,16 +633,16 @@ Opens a file. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file to open.| | uri | string | Yes| URI of the file to open.|
| flags | [OPENFLAGS](#openflags) | Yes| File open mode.| | flags | [OPENFLAGS](#openflags) | Yes| File open mode.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| --- | -- | | --- | -- |
| Promise<number> | Promise used to return the handle to the file opened.| | Promise<number> | Promise used to return the file descriptor of the file opened.|
**Example** **Example**
...@@ -673,11 +671,11 @@ Opens a file. This API uses an asynchronous callback to return the result. ...@@ -673,11 +671,11 @@ Opens a file. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file to open.| | uri | string | Yes| URI of the file to open.|
| flags | [OPENFLAGS](#openflags) | Yes| File open mode.| | flags | [OPENFLAGS](#openflags) | Yes| File open mode.|
| callback | AsyncCallback<number> | Yes| Promise used to return the handle to the file opened.| | callback | AsyncCallback<number> | Yes| Callback invoked to return the file descriptor of the file opened.|
**Example** **Example**
...@@ -712,9 +710,9 @@ Deletes a file or folder. This API uses a promise to return the result. ...@@ -712,9 +710,9 @@ Deletes a file or folder. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to delete.| | uri | string | Yes| URI of the file or folder to delete.|
**Return value** **Return value**
...@@ -751,10 +749,10 @@ Deletes a file or folder. This API uses an asynchronous callback to return the r ...@@ -751,10 +749,10 @@ Deletes a file or folder. This API uses an asynchronous callback to return the r
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to delete.| | uri | string | Yes| URI of the file or folder to delete.|
| callback | AsyncCallback<number> | Yes| Promise used to return the result.| | callback | AsyncCallback<number> | Yes| Promise used to return the result.|
**Example** **Example**
...@@ -789,10 +787,10 @@ Moves a file or folder. This API uses a promise to return the result. ...@@ -789,10 +787,10 @@ Moves a file or folder. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFile | string | Yes| URI of the file or folder to move.| | sourceFile | string | Yes| URI of the file or folder to move.|
| destFile | string | Yes| URI of the folder to which the file or folder will be moved.| | destFile | string | Yes| URI of the folder to which the file or folder will be moved.|
**Return value** **Return value**
...@@ -829,11 +827,11 @@ Moves a file or folder. This API uses an asynchronous callback to return the res ...@@ -829,11 +827,11 @@ Moves a file or folder. This API uses an asynchronous callback to return the res
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFile | string | Yes| URI of the file or folder to move.| | sourceFile | string | Yes| URI of the file or folder to move.|
| destFile | string | Yes| URI of the folder to which the file or folder will be moved.| | destFile | string | Yes| URI of the folder to which the file or folder will be moved.|
| callback | AsyncCallback<string> | Yes| Promise used to return the URI of the file or folder in the destination directory.| | callback | AsyncCallback<string> | Yes| Promise used to return the URI of the file or folder in the destination directory.|
**Example** **Example**
...@@ -869,10 +867,10 @@ Renames a file or folder. This API uses a promise to return the result. ...@@ -869,10 +867,10 @@ Renames a file or folder. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to rename.| | uri | string | Yes| URI of the file or folder to rename.|
| displayName | string | Yes| New name of the file or folder, which can contain the file name extension.| | displayName | string | Yes| New name of the file or folder, which can contain the file name extension.|
**Return value** **Return value**
...@@ -908,11 +906,11 @@ Renames a file or folder. This API uses an asynchronous callback to return the r ...@@ -908,11 +906,11 @@ Renames a file or folder. This API uses an asynchronous callback to return the r
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| uri | string | Yes| URI of the file or folder to rename.| | uri | string | Yes| URI of the file or folder to rename.|
| displayName | string | Yes| New name of the file or folder, which can contain the file name extension.| | displayName | string | Yes| New name of the file or folder, which can contain the file name extension.|
| callback | AsyncCallback<string> | Yes| Promise used to return the URI of the renamed file or folder.| | callback | AsyncCallback<string> | Yes| Promise used to return the URI of the renamed file or folder.|
**Example** **Example**
...@@ -947,9 +945,9 @@ Checks whether a file or folder exists. This API uses a promise to return the re ...@@ -947,9 +945,9 @@ Checks whether a file or folder exists. This API uses a promise to return the re
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFileUri | string | Yes| URI of the file or folder.| | sourceFileUri | string | Yes| URI of the file or folder.|
**Return value** **Return value**
...@@ -988,10 +986,10 @@ Checks whether a file or folder exists. This API uses an asynchronous callback t ...@@ -988,10 +986,10 @@ Checks whether a file or folder exists. This API uses an asynchronous callback t
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| --- | --- | --- | -- | | --- | --- | --- | -- |
| sourceFileUri | string | Yes| URI of the file or folder.| | sourceFileUri | string | Yes| URI of the file or folder.|
| callback | AsyncCallback<boolean> | Yes| Promise used to return the result.| | callback | AsyncCallback<boolean> | Yes| Promise used to return the result.|
**Example** **Example**
......
...@@ -83,10 +83,10 @@ async function example() { ...@@ -83,10 +83,10 @@ async function example() {
console.info('fetchResult success'); console.info('fetchResult success');
let fileAsset = await fetchResult.getFirstObject(); let fileAsset = await fetchResult.getFirstObject();
if (fileAsset != undefined) { if (fileAsset != undefined) {
console.info("fileAsset.displayName :" + fileAsset.displayName); console.info("fileAsset.displayName : " + fileAsset.displayName);
} }
} else { } else {
console.info('fetchResult fail' + err); console.error('fetchResult fail' + err);
} }
}); });
} }
...@@ -137,7 +137,7 @@ async function example() { ...@@ -137,7 +137,7 @@ async function example() {
} }
} }
} catch (err) { } catch (err) {
console.info('getPhotoAssets failed, message = ', err); console.error('getPhotoAssets failed, message = ', err);
} }
} }
``` ```
...@@ -178,7 +178,7 @@ async function example() { ...@@ -178,7 +178,7 @@ async function example() {
console.info('createPhotoAsset file displayName' + fileAsset.displayName); console.info('createPhotoAsset file displayName' + fileAsset.displayName);
console.info('createPhotoAsset successfully'); console.info('createPhotoAsset successfully');
} else { } else {
console.info('createPhotoAsset failed, message = ', err); console.error('createPhotoAsset failed, message = ', err);
} }
}); });
} }
...@@ -212,7 +212,7 @@ async function example() { ...@@ -212,7 +212,7 @@ async function example() {
console.info('createPhotoAsset file displayName' + fileAsset.displayName); console.info('createPhotoAsset file displayName' + fileAsset.displayName);
console.info('createPhotoAsset successfully'); console.info('createPhotoAsset successfully');
} else { } else {
console.info('createPhotoAsset failed, message = ', err); console.error('createPhotoAsset failed, message = ', err);
} }
}); });
} }
...@@ -252,7 +252,7 @@ async function example() { ...@@ -252,7 +252,7 @@ async function example() {
console.info('createPhotoAsset file displayName' + fileAsset.displayName); console.info('createPhotoAsset file displayName' + fileAsset.displayName);
console.info('createPhotoAsset successfully'); console.info('createPhotoAsset successfully');
} catch (err) { } catch (err) {
console.info('createPhotoAsset failed, message = ', err); console.error('createPhotoAsset failed, message = ', err);
} }
} }
``` ```
...@@ -294,11 +294,11 @@ async function example() { ...@@ -294,11 +294,11 @@ async function example() {
if (album != undefined) { if (album != undefined) {
console.info('first album.albumName = ' + album.albumName); console.info('first album.albumName = ' + album.albumName);
} else { } else {
console.info('album is undefined, err = ', err); console.error('album is undefined, err = ', err);
} }
}); });
} else { } else {
console.info('getPhotoAlbums fail, message = ', err); console.error('getPhotoAlbums fail, message = ', err);
} }
}); });
} }
...@@ -343,7 +343,7 @@ async function example() { ...@@ -343,7 +343,7 @@ async function example() {
const album = await fetchResult.getFirstObject(); const album = await fetchResult.getFirstObject();
console.info('first album.albumName = ' + album.albumName); console.info('first album.albumName = ' + album.albumName);
} catch (err) { } catch (err) {
console.info('getPhotoAlbums fail, message = ' + err); console.error('getPhotoAlbums fail, message = ' + err);
} }
} }
``` ```
...@@ -376,7 +376,7 @@ async function example() { ...@@ -376,7 +376,7 @@ async function example() {
let trashAlbum = await fetchResult.getFirstObject(); let trashAlbum = await fetchResult.getFirstObject();
console.info('first album.albumName = ' + trashAlbum.albumName); console.info('first album.albumName = ' + trashAlbum.albumName);
} else { } else {
console.info('getPrivateAlbum failed. message = ', err); console.error('getPrivateAlbum failed. message = ', err);
} }
}); });
} }
...@@ -415,7 +415,7 @@ async function example() { ...@@ -415,7 +415,7 @@ async function example() {
let trashAlbum = await fetchResult.getFirstObject(); let trashAlbum = await fetchResult.getFirstObject();
console.info('first album.albumName = ' + trashAlbum.albumName); console.info('first album.albumName = ' + trashAlbum.albumName);
} catch (err) { } catch (err) {
console.info('getPrivateAlbum failed. message = ', err); console.error('getPrivateAlbum failed. message = ', err);
} }
} }
``` ```
...@@ -459,7 +459,7 @@ async function example() { ...@@ -459,7 +459,7 @@ async function example() {
console.info("fileAsset.displayName :" + fileAsset.displayName); console.info("fileAsset.displayName :" + fileAsset.displayName);
} }
} else { } else {
console.info('fetchFileResult fail' + err); console.error('fetchFileResult fail' + err);
} }
}); });
} }
...@@ -503,7 +503,7 @@ async function example() { ...@@ -503,7 +503,7 @@ async function example() {
try { try {
var fetchResult = await mgr.getAudioAssets(fetchOptions); var fetchResult = await mgr.getAudioAssets(fetchOptions);
} catch (err) { } catch (err) {
console.info('getAudioAssets failed, message = ', err); console.error('getAudioAssets failed, message = ', err);
} }
if (fetchResult != undefined) { if (fetchResult != undefined) {
...@@ -559,7 +559,7 @@ async function example() { ...@@ -559,7 +559,7 @@ async function example() {
if (err == undefined) { if (err == undefined) {
console.info("delete successfully"); console.info("delete successfully");
} else { } else {
console.info("delete failed with error:" + err); console.error("delete failed with error: " + err);
} }
}); });
} }
...@@ -613,7 +613,7 @@ async function example() { ...@@ -613,7 +613,7 @@ async function example() {
await mgr.delete(asset.uri); await mgr.delete(asset.uri);
console.info("delete successfully"); console.info("delete successfully");
} catch (err) { } catch (err) {
console.info("delete failed with error:" + err); console.error("delete failed with error: " + err);
} }
} }
``` ```
...@@ -649,13 +649,13 @@ async function example() { ...@@ -649,13 +649,13 @@ async function example() {
console.info('createPhotoAsset file displayName' + fileAsset.displayName); console.info('createPhotoAsset file displayName' + fileAsset.displayName);
console.info('createPhotoAsset successfully'); console.info('createPhotoAsset successfully');
} catch (err) { } catch (err) {
console.info('createPhotoAsset failed, message = ' + err); console.error('createPhotoAsset failed, message = ' + err);
} }
//sleep 1s //sleep 1s
if (count > 0) { if (count > 0) {
console.info("onDemo success"); console.info("onDemo success");
} else { } else {
console.info("onDemo fail"); console.error("onDemo fail");
} }
mgr.off('imageChange', () => { mgr.off('imageChange', () => {
// Unsubscription succeeds. // Unsubscription succeeds.
...@@ -699,13 +699,13 @@ async function example() { ...@@ -699,13 +699,13 @@ async function example() {
console.info('createPhotoAsset file displayName' + fileAsset.displayName); console.info('createPhotoAsset file displayName' + fileAsset.displayName);
console.info('createPhotoAsset successfully'); console.info('createPhotoAsset successfully');
} catch (err) { } catch (err) {
console.info('createPhotoAsset failed, message = ' + err); console.error('createPhotoAsset failed, message = ' + err);
} }
//sleep 1s //sleep 1s
if (count == 0) { if (count == 0) {
console.info("offDemo success"); console.info("offDemo success");
} else { } else {
console.info("offDemo fail"); console.error("offDemo fail");
} }
} }
``` ```
...@@ -736,7 +736,7 @@ async function example() { ...@@ -736,7 +736,7 @@ async function example() {
console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId); console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId);
} }
} else { } else {
console.info('getActivePeers failed. message = ', err); console.error('getActivePeers failed. message = ', err);
} }
}); });
} }
...@@ -764,7 +764,7 @@ async function example() { ...@@ -764,7 +764,7 @@ async function example() {
try { try {
var devicesInfo = await mgr.getActivePeers(); var devicesInfo = await mgr.getActivePeers();
} catch (err) { } catch (err) {
console.info('getActivePeers failed. message = ', err); console.error('getActivePeers failed. message = ', err);
} }
if (devicesInfo != undefined) { if (devicesInfo != undefined) {
console.log('getActivePeers succeed.'); console.log('getActivePeers succeed.');
...@@ -772,7 +772,7 @@ async function example() { ...@@ -772,7 +772,7 @@ async function example() {
console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId); console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId);
} }
} else { } else {
console.info('get distributed fail'); console.error('get distributed fail');
} }
} }
``` ```
...@@ -803,7 +803,7 @@ async function example() { ...@@ -803,7 +803,7 @@ async function example() {
console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId); console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId);
} }
} else { } else {
console.info('getAllPeers failed. message = ', err); console.error('getAllPeers failed. message = ', err);
} }
}); });
} }
...@@ -831,7 +831,7 @@ async function example() { ...@@ -831,7 +831,7 @@ async function example() {
try { try {
var devicesInfo = await mgr.getAllPeers(); var devicesInfo = await mgr.getAllPeers();
} catch (err) { } catch (err) {
console.info('getAllPeers failed. message = ', err); console.error('getAllPeers failed. message = ', err);
} }
if (devicesInfo != undefined) { if (devicesInfo != undefined) {
console.log('getAllPeers succeed.'); console.log('getAllPeers succeed.');
...@@ -839,7 +839,7 @@ async function example() { ...@@ -839,7 +839,7 @@ async function example() {
console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId); console.info('get distributed info ' + devicesInfo[i].deviceName + devicesInfo[i].networkId);
} }
} else { } else {
console.info('get distributed fail'); console.error('get distributed fail');
} }
} }
``` ```
...@@ -866,7 +866,7 @@ async function example() { ...@@ -866,7 +866,7 @@ async function example() {
console.info('releaseDemo'); console.info('releaseDemo');
mgr.release((err) => { mgr.release((err) => {
if (err != undefined) { if (err != undefined) {
console.info('release failed. message = ', err); console.error('release failed. message = ', err);
} else { } else {
console.info('release ok.'); console.info('release ok.');
} }
...@@ -898,7 +898,7 @@ async function example() { ...@@ -898,7 +898,7 @@ async function example() {
await mgr.release(); await mgr.release();
console.info('release ok.'); console.info('release ok.');
} catch (err) { } catch (err) {
console.info('release failed. message = ', err); console.error('release failed. message = ', err);
} }
} }
``` ```
...@@ -951,7 +951,7 @@ async function example() { ...@@ -951,7 +951,7 @@ async function example() {
let fileAssetTitle = fileAsset.get(title.toString()); let fileAssetTitle = fileAsset.get(title.toString());
console.info('fileAsset Get fileAssetTitle = ', fileAssetTitle); console.info('fileAsset Get fileAssetTitle = ', fileAssetTitle);
} catch (err) { } catch (err) {
console.info('release failed. message = ', err); console.error('release failed. message = ', err);
} }
} }
``` ```
...@@ -989,7 +989,7 @@ async function example() { ...@@ -989,7 +989,7 @@ async function example() {
let title = userFileManager.ImageVideoKey.TITLE; let title = userFileManager.ImageVideoKey.TITLE;
fileAsset.set(title.toString(), "newTitle"); fileAsset.set(title.toString(), "newTitle");
} catch (err) { } catch (err) {
console.info('release failed. message = ', err); console.error('release failed. message = ', err);
} }
} }
``` ```
...@@ -1033,7 +1033,7 @@ async function example() { ...@@ -1033,7 +1033,7 @@ async function example() {
let newFileAssetTitle = fileAsset.get(title.toString()); let newFileAssetTitle = fileAsset.get(title.toString());
console.info('fileAsset Get newFileAssetTitle = ', newFileAssetTitle); console.info('fileAsset Get newFileAssetTitle = ', newFileAssetTitle);
} else { } else {
console.info('commitModify failed, message =', err); console.error('commitModify failed, message =', err);
} }
}); });
} }
...@@ -1078,7 +1078,7 @@ async function example() { ...@@ -1078,7 +1078,7 @@ async function example() {
let newFileAssetTitle = fileAsset.get(title.toString()); let newFileAssetTitle = fileAsset.get(title.toString());
console.info('fileAsset Get newFileAssetTitle = ', newFileAssetTitle); console.info('fileAsset Get newFileAssetTitle = ', newFileAssetTitle);
} catch (err) { } catch (err) {
console.info('release failed. message = ', err); console.error('release failed. message = ', err);
} }
} }
``` ```
...@@ -1089,9 +1089,7 @@ open(mode: string, callback: AsyncCallback<number>): void ...@@ -1089,9 +1089,7 @@ open(mode: string, callback: AsyncCallback<number>): void
Opens this file asset. This API uses an asynchronous callback to return the result. Opens this file asset. This API uses an asynchronous callback to return the result.
>**NOTE** **NOTE**<br>The write operations are mutually exclusive. After a write operation is complete, you must call **close** to release the resource.
>
>The write operations are mutually exclusive. After a write operation is complete, you must call **close** to release the resource.
**Required permissions**: ohos.permission.READ_IMAGEVIDEO, ohos.permission.READ_AUDIO, ohos.permission.WRITE_IMAGEVIDEO, or ohos.permission.WRITE_AUDIO **Required permissions**: ohos.permission.READ_IMAGEVIDEO, ohos.permission.READ_AUDIO, ohos.permission.WRITE_IMAGEVIDEO, or ohos.permission.WRITE_AUDIO
...@@ -1103,7 +1101,7 @@ Opens this file asset. This API uses an asynchronous callback to return the resu ...@@ -1103,7 +1101,7 @@ Opens this file asset. This API uses an asynchronous callback to return the resu
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------------------------------- | | -------- | --------------------------- | ---- | ----------------------------------- |
| mode | string | Yes | File open mode, which can be **r** (read-only), **w** (write-only), or **rw** (read-write).| | mode | string | Yes | File open mode, which can be **r** (read-only), **w** (write-only), or **rw** (read-write).|
| callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the file handle. | | callback | AsyncCallback&lt;number&gt; | Yes | Callback invoked to return the file descriptor. |
**Example** **Example**
...@@ -1117,7 +1115,7 @@ async function example() { ...@@ -1117,7 +1115,7 @@ async function example() {
console.info('File fd' + fd); console.info('File fd' + fd);
fileAsset.close(fd); fileAsset.close(fd);
} else { } else {
console.info('File err' + err); console.error('File err' + err);
} }
}); });
} }
...@@ -1129,9 +1127,7 @@ open(mode: string): Promise&lt;number&gt; ...@@ -1129,9 +1127,7 @@ open(mode: string): Promise&lt;number&gt;
Opens this file asset. This API uses a promise to return the result. Opens this file asset. This API uses a promise to return the result.
>**NOTE** **NOTE**<br>The write operations are mutually exclusive. After a write operation is complete, you must call **close** to release the resource.
>
>The write operations are mutually exclusive. After a write operation is complete, you must call **close** to release the resource.
**Required permissions**: ohos.permission.READ_IMAGEVIDEO, ohos.permission.READ_AUDIO, ohos.permission.WRITE_IMAGEVIDEO, or ohos.permission.WRITE_AUDIO **Required permissions**: ohos.permission.READ_IMAGEVIDEO, ohos.permission.READ_AUDIO, ohos.permission.WRITE_IMAGEVIDEO, or ohos.permission.WRITE_AUDIO
...@@ -1147,7 +1143,7 @@ Opens this file asset. This API uses a promise to return the result. ...@@ -1147,7 +1143,7 @@ Opens this file asset. This API uses a promise to return the result.
| Type | Description | | Type | Description |
| --------------------- | ------------- | | --------------------- | ------------- |
| Promise&lt;number&gt; | Promise used to return the file handle.| | Promise&lt;number&gt; | Promise used to return the file descriptor.|
**Example** **Example**
...@@ -1162,10 +1158,10 @@ async function example() { ...@@ -1162,10 +1158,10 @@ async function example() {
console.info('File fd' + fd); console.info('File fd' + fd);
fileAsset.close(fd); fileAsset.close(fd);
} else { } else {
console.info(' open File fail'); console.error(' open File fail');
} }
} catch (err) { } catch (err) {
console.info('open Demo err' + err); console.error('open Demo err' + err);
} }
} }
``` ```
...@@ -1206,11 +1202,11 @@ async function example() { ...@@ -1206,11 +1202,11 @@ async function example() {
if (err == undefined) { if (err == undefined) {
console.info('asset close succeed.'); console.info('asset close succeed.');
} else { } else {
console.info('close failed, message = ' + err); console.error('close failed, message = ' + err);
} }
}); });
} catch (err) { } catch (err) {
console.info('close failed, message = ' + err); console.error('close failed, message = ' + err);
} }
} }
``` ```
...@@ -1255,7 +1251,7 @@ async function example() { ...@@ -1255,7 +1251,7 @@ async function example() {
await asset.close(fd); await asset.close(fd);
console.info('asset close succeed.'); console.info('asset close succeed.');
} catch (err) { } catch (err) {
console.info('close failed, message = ' + err); console.error('close failed, message = ' + err);
} }
} }
``` ```
...@@ -1295,7 +1291,7 @@ async function example() { ...@@ -1295,7 +1291,7 @@ async function example() {
if (err == undefined) { if (err == undefined) {
console.info('getThumbnail successful ' + pixelMap); console.info('getThumbnail successful ' + pixelMap);
} else { } else {
console.info('getThumbnail fail', err); console.error('getThumbnail fail', err);
} }
}); });
} }
...@@ -1338,7 +1334,7 @@ async function example() { ...@@ -1338,7 +1334,7 @@ async function example() {
if (err == undefined) { if (err == undefined) {
console.info('getThumbnail successful ' + pixelMap); console.info('getThumbnail successful ' + pixelMap);
} else { } else {
console.info('getThumbnail fail', err); console.error('getThumbnail fail', err);
} }
}); });
} }
...@@ -1385,7 +1381,7 @@ async function example() { ...@@ -1385,7 +1381,7 @@ async function example() {
asset.getThumbnail(size).then((pixelMap) => { asset.getThumbnail(size).then((pixelMap) => {
console.info('getThumbnail successful ' + pixelMap); console.info('getThumbnail successful ' + pixelMap);
}).catch((err) => { }).catch((err) => {
console.info('getThumbnail fail' + err); console.error('getThumbnail fail' + err);
}); });
} }
``` ```
...@@ -1425,7 +1421,7 @@ async function example() { ...@@ -1425,7 +1421,7 @@ async function example() {
if (err == undefined) { if (err == undefined) {
console.info("favorite successfully"); console.info("favorite successfully");
} else { } else {
console.info("favorite failed with error:" + err); console.error("favorite failed with error:" + err);
} }
}); });
} }
...@@ -1470,7 +1466,7 @@ async function example() { ...@@ -1470,7 +1466,7 @@ async function example() {
asset.favorite(true).then(function () { asset.favorite(true).then(function () {
console.info("favorite successfully"); console.info("favorite successfully");
}).catch(function (err) { }).catch(function (err) {
console.info("favorite failed with error:" + err); console.error("favorite failed with error:" + err);
}); });
} }
``` ```
...@@ -1573,7 +1569,7 @@ async function example() { ...@@ -1573,7 +1569,7 @@ async function example() {
await fetchResult.close(); await fetchResult.close();
console.info('close succeed.'); console.info('close succeed.');
} catch (err) { } catch (err) {
console.info('close fail. message = ' + err); console.error('close fail. message = ' + err);
} }
} }
``` ```
...@@ -1609,7 +1605,7 @@ async function example() { ...@@ -1609,7 +1605,7 @@ async function example() {
if (fileAsset != undefined) { if (fileAsset != undefined) {
console.info('fileAsset displayName: ', fileAsset.displayName); console.info('fileAsset displayName: ', fileAsset.displayName);
} else { } else {
console.info("fileAsset failed with err:" + err); console.error("fileAsset failed with err:" + err);
} }
}); });
} }
...@@ -1680,7 +1676,7 @@ async function example() { ...@@ -1680,7 +1676,7 @@ async function example() {
if (fileAsset != undefined) { if (fileAsset != undefined) {
console.info('fileAsset displayName: ', fileAsset.displayName); console.info('fileAsset displayName: ', fileAsset.displayName);
} else { } else {
console.info("fileAsset failed with err:" + err); console.error("fileAsset failed with err: " + err);
} }
}); });
} }
...@@ -1753,7 +1749,7 @@ async function example() { ...@@ -1753,7 +1749,7 @@ async function example() {
if (fileAsset != undefined) { if (fileAsset != undefined) {
console.info('fileAsset displayName: ', fileAsset.displayName); console.info('fileAsset displayName: ', fileAsset.displayName);
} else { } else {
console.info("fileAsset failed with err:" + err); console.error("fileAsset failed with err: " + err);
} }
}); });
} }
...@@ -1823,7 +1819,7 @@ async function example() { ...@@ -1823,7 +1819,7 @@ async function example() {
if (fileAsset != undefined) { if (fileAsset != undefined) {
console.info('fileAsset displayName: ', fileAsset.displayName); console.info('fileAsset displayName: ', fileAsset.displayName);
} else { } else {
console.info("fileAsset failed with err:" + err); console.error("fileAsset failed with err: " + err);
} }
}); });
} }
...@@ -1920,9 +1916,9 @@ async function example() { ...@@ -1920,9 +1916,9 @@ async function example() {
const album = await albumList.getFirstObject(); const album = await albumList.getFirstObject();
album.getPhotoAssets(fetchOption, (err, albumFetchResult) => { album.getPhotoAssets(fetchOption, (err, albumFetchResult) => {
if (albumFetchResult != undefined) { if (albumFetchResult != undefined) {
console.info("album getPhotoAssets successfully, getCount:" + albumFetchResult.getCount()); console.info("album getPhotoAssets successfully, getCount: " + albumFetchResult.getCount());
} else { } else {
console.info("album getPhotoAssets failed with error:" + err); console.error("album getPhotoAssets failed with error: " + err);
} }
}); });
} }
...@@ -1963,9 +1959,9 @@ async function example() { ...@@ -1963,9 +1959,9 @@ async function example() {
const albumList = await mgr.getPhotoAlbums(albumFetchOptions); const albumList = await mgr.getPhotoAlbums(albumFetchOptions);
const album = await albumList.getFirstObject(); const album = await albumList.getFirstObject();
album.getPhotoAssets(fetchOption).then((albumFetchResult) => { album.getPhotoAssets(fetchOption).then((albumFetchResult) => {
console.info("album getFileAssets successfully, getCount:" + albumFetchResult.getCount()); console.info("album getFileAssets successfully, getCount: " + albumFetchResult.getCount());
}).catch((err) => { }).catch((err) => {
console.info("album getFileAssets failed with error:" + err); console.error("album getFileAssets failed with error: " + err);
}); });
} }
``` ```
...@@ -2002,7 +1998,7 @@ async function example() { ...@@ -2002,7 +1998,7 @@ async function example() {
album.albumName = 'hello'; album.albumName = 'hello';
album.commitModify((err) => { album.commitModify((err) => {
if (err != undefined) { if (err != undefined) {
console.info("commitModify failed with error:" + err); console.error("commitModify failed with error: " + err);
} else { } else {
console.info("commitModify successfully"); console.info("commitModify successfully");
} }
...@@ -2040,14 +2036,14 @@ async function example() { ...@@ -2040,14 +2036,14 @@ async function example() {
try { try {
var albumList = await mgr.getPhotoAlbums(albumFetchOptions); var albumList = await mgr.getPhotoAlbums(albumFetchOptions);
} catch (err) { } catch (err) {
console.info('getPhotoAlbums failed. message = ', err); console.error('getPhotoAlbums failed. message = ', err);
} }
const album = await albumList.getFirstObject(); const album = await albumList.getFirstObject();
album.albumName = 'hello'; album.albumName = 'hello';
album.commitModify().then(() => { album.commitModify().then(() => {
console.info("commitModify successfully"); console.info("commitModify successfully");
}).catch((err) => { }).catch((err) => {
console.info("commitModify failed with error:" + err); console.error("commitModify failed with error: " + err);
}); });
} }
``` ```
...@@ -2104,7 +2100,7 @@ async function example() { ...@@ -2104,7 +2100,7 @@ async function example() {
let count = fetchResult.getCount(); let count = fetchResult.getCount();
console.info('fetchResult.count = ', count); console.info('fetchResult.count = ', count);
} else { } else {
console.info('getFileAssets failed, message = ', err); console.error('getFileAssets failed, message = ', err);
} }
}); });
} }
...@@ -2187,7 +2183,7 @@ async function example() { ...@@ -2187,7 +2183,7 @@ async function example() {
let deleteFileUri = fileAsset.uri; let deleteFileUri = fileAsset.uri;
trashAlbum.delete(deleteFileUri, (err) => { trashAlbum.delete(deleteFileUri, (err) => {
if (err != undefined) { if (err != undefined) {
console.info('trashAlbum.delete failed, message = ', err); console.error('trashAlbum.delete failed, message = ', err);
} else { } else {
console.info('trashAlbum.delete successfully'); console.info('trashAlbum.delete successfully');
} }
...@@ -2236,7 +2232,7 @@ async function example() { ...@@ -2236,7 +2232,7 @@ async function example() {
trashAlbum.delete(deleteFileUri).then(() => { trashAlbum.delete(deleteFileUri).then(() => {
console.info('trashAlbum.delete successfully'); console.info('trashAlbum.delete successfully');
}).catch((err) => { }).catch((err) => {
console.info('trashAlbum.delete failed, message = ', err); console.error('trashAlbum.delete failed, message = ', err);
}); });
} }
``` ```
...@@ -2277,7 +2273,7 @@ async function example() { ...@@ -2277,7 +2273,7 @@ async function example() {
let recoverFileUri = fileAsset.uri; let recoverFileUri = fileAsset.uri;
trashAlbum.recover(recoverFileUri, (err) => { trashAlbum.recover(recoverFileUri, (err) => {
if (err != undefined) { if (err != undefined) {
console.info('trashAlbum.recover failed, message = ', err); console.error('trashAlbum.recover failed, message = ', err);
} else { } else {
console.info('trashAlbum.recover successfully'); console.info('trashAlbum.recover successfully');
} }
...@@ -2326,7 +2322,7 @@ async function example() { ...@@ -2326,7 +2322,7 @@ async function example() {
trashAlbum.recover(recoverFileUri).then(() => { trashAlbum.recover(recoverFileUri).then(() => {
console.info('trashAlbum.recover successfully'); console.info('trashAlbum.recover successfully');
}).catch((err) => { }).catch((err) => {
console.info('trashAlbum.recover failed, message = ', err); console.error('trashAlbum.recover failed, message = ', err);
}); });
} }
``` ```
...@@ -2339,9 +2335,9 @@ Enumerates the member types. ...@@ -2339,9 +2335,9 @@ Enumerates the member types.
| Name | Type| Readable | Writable | Description | | Name | Type| Readable | Writable | Description |
| ----- | ---- | ---- | ---- | ---- | | ----- | ---- | ---- | ---- | ---- |
| number | number | Yes| Yes| The member is a number.| | number | number | Yes| Yes| The member is a number.|
| string | string | Yes| Yes| The member is a string.| | string | string | Yes| Yes| The member is a string.|
| boolean | boolean | Yes| Yes| The member is a Boolean value.| | boolean | boolean | Yes| Yes| The member is a Boolean value.|
## ChangeEvent ## ChangeEvent
...@@ -2407,7 +2403,7 @@ Defines the key information about an audio file. ...@@ -2407,7 +2403,7 @@ Defines the key information about an audio file.
| URI | uri | File URI. | | URI | uri | File URI. |
| DISPLAY_NAME | display_name | File name displayed. | | DISPLAY_NAME | display_name | File name displayed. |
| DATE_ADDED | date_added | Date when the file was added. The value is the number of seconds elapsed since the Epoch time. | | DATE_ADDED | date_added | Date when the file was added. The value is the number of seconds elapsed since the Epoch time. |
| DATE_MODIFIED | date_modified | Date when the file was last modified. The value is the number of seconds elapsed since the Epoch time. | | DATE_MODIFIED | date_modified | Date when the file content (not the file name) was last modified. The value is the number of seconds elapsed since the Epoch time.|
| TITLE | title | Title in the file. | | TITLE | title | Title in the file. |
| ARTIST | artist | Author of the file. | | ARTIST | artist | Author of the file. |
| AUDIOALBUM | audio_album | Audio album. | | AUDIOALBUM | audio_album | Audio album. |
...@@ -2426,7 +2422,7 @@ Defines the key information about an image or video file. ...@@ -2426,7 +2422,7 @@ Defines the key information about an image or video file.
| FILE_TYPE | file_type | Type of the file. | | FILE_TYPE | file_type | Type of the file. |
| DISPLAY_NAME | display_name | File name displayed. | | DISPLAY_NAME | display_name | File name displayed. |
| DATE_ADDED | date_added | Date when the file was added. The value is the number of seconds elapsed since the Epoch time. | | DATE_ADDED | date_added | Date when the file was added. The value is the number of seconds elapsed since the Epoch time. |
| DATE_MODIFIED | date_modified | Date when the file was last modified. The value is the number of seconds elapsed since the Epoch time. | | DATE_MODIFIED | date_modified | Date when the file content (not the file name) was last modified. The value is the number of seconds elapsed since the Epoch time.|
| TITLE | title | Title in the file. | | TITLE | title | Title in the file. |
| DURATION | duration | Duration, in ms. | | DURATION | duration | Duration, in ms. |
| WIDTH | width | Image width, in pixels. | | WIDTH | width | Image width, in pixels. |
...@@ -2447,7 +2443,7 @@ Defines the key album information. ...@@ -2447,7 +2443,7 @@ Defines the key album information.
| FILE_TYPE | file_type | Type of the file. | | FILE_TYPE | file_type | Type of the file. |
| ALBUM_NAME | album_name | Name of the album. | | ALBUM_NAME | album_name | Name of the album. |
| DATE_ADDED | date_added | Date when the file was added. The value is the number of seconds elapsed since the Epoch time. | | DATE_ADDED | date_added | Date when the file was added. The value is the number of seconds elapsed since the Epoch time. |
| DATE_MODIFIED | date_modified | Date when the file was last modified. The value is the number of seconds elapsed since the Epoch time. | | DATE_MODIFIED | date_modified | Date when the file content (not the file name) was last modified. The value is the number of seconds elapsed since the Epoch time.|
## FetchOptions ## FetchOptions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册