Obtains the app accounts that can be accessed by the invoker based on the app account owner. This API uses an asynchronous callback to return the result.
Obtains the app accounts that can be accessed by the invoker based on the app account owner. This API uses an asynchronous callback to return the result.
| name | string | Yes | Name of the target app account. |
| name | string | Yes | Name of the app account to add. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds an app account name and additional information. This API uses an asynchronous callback to return the result. This API uses a promise to return the result.
Adds an app account name and additional information. This API uses an asynchronous callback to return the result. This API uses a promise to return the result.
> **NOTE**
> **NOTE**<br>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createAccount](#createaccount9-2).
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createAccount](#createaccount9-2).
| name | string | Yes | Name of the target app account. |
| name | string | Yes | Name of the app account to delete. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Example**
**Example**
...
@@ -2871,7 +2905,7 @@ Deletes an app account. This API uses a promise to return the result.
...
@@ -2871,7 +2905,7 @@ Deletes an app account. This API uses a promise to return the result.
| Name | Type | Mandatory | Description |
| Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ----------- |
| ---- | ------ | ---- | ----------- |
| name | string | Yes | Name of the target app account.|
| name | string | Yes | Name of the app account to delete.|
**Return value**
**Return value**
...
@@ -3756,18 +3790,23 @@ Authenticates an app account with customized options. This API uses an asynchron
...
@@ -3756,18 +3790,23 @@ Authenticates an app account with customized options. This API uses an asynchron
| KEY_BOOLEAN_RESULT<sup>9+</sup> | "booleanResult" | Return value of the Boolean type. |
| KEY_BOOLEAN_RESULT<sup>9+</sup> | "booleanResult" | Return value of the Boolean type. |
## ResultCode<sup>8+</sup>
## ResultCode<sup>(deprecated)</sup>
Enumerates the result codes.
Enumerates the result codes.
> **NOTE**
> This enum is supported since API version 8 and deprecated since API version 9. From API version 9, error codes are used. For details about the error codes, see [App Account Error Codes](../errorcodes/errorcode-account.md).
Before using the APIs provided by this module to perform operations on files or directories, obtain the path of the application sandbox as follows:
Before using the APIs provided by this module to perform operations on files or directories, obtain the path of the file or directory in the application sandbox as follows:
**Stage Model**
**Stage Model**
...
@@ -147,7 +147,7 @@ Checks whether a file exists. This API uses a promise to return the result.
...
@@ -147,7 +147,7 @@ Checks whether a file exists. This API uses a promise to return the result.
| filePath | string | Yes | Path of the file in the application sandbox. |
| filePath | string | Yes | Path of the file in the application sandbox. |
| options | Object | No | The options are as follows:<br>- **offset** (number): position of the data to read in the file. This parameter is optional. By default, data is read from the current position.<br>- **length** (number): length of the data to read. This parameter is optional. The default value is the file length.<br>- **encoding** (string): format of the string to be encoded. The default value is **'utf-8'**, which is the only value supported.|
| options | Object | No | The options are as follows:<br>- **offset** (number): position of the data to read in the file. This parameter is optional. By default, data is read from the current position.<br>- **length** (number): length of the data to read. This parameter is optional. The default value is the file length.<br>- **encoding** (string): format of the string to be encoded. The default value is **'utf-8'**, which is the only value supported.|
| callback | AsyncCallback<string> | Yes | Callback used to return the content read. |
| callback | AsyncCallback<string> | Yes | Callback invoked to return the content read. |
**Example**
**Example**
...
@@ -1169,7 +1169,7 @@ Obtains information about a symbolic link. This API uses an asynchronous callbac
...
@@ -1169,7 +1169,7 @@ Obtains information about a symbolic link. This API uses an asynchronous callbac
The **storageStatistics** module provides APIs for obtaining storage space information, including the space of built-in and plug-in memory cards, space occupied by different types of data, and space of application data.
> **NOTE**
>
> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module support processing of error codes. For details, see [File Management Error Codes](../errorcodes/errorcode-filemanagement.md).
Obtains the available space (in bytes) of the specified volume in an external storage device. This API uses an asynchronous callback to return the result.
The volumeManager module provides APIs for volume and disk management, including obtaining volume information, mounting or unmounting volumes, partitioning disks, and formatting volumes.
> **NOTE**
>
> - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs provided by this module are system APIs.
> - The APIs of this module support processing of error codes. For details, see [File Management Error Codes](../errorcodes/errorcode-filemanagement.md).