The relational database (RDB) store manages data based on relational models. With the underlying SQLite database, the RDB store provides a complete mechanism for managing local databases. To satisfy different needs in complicated scenarios, the RDB store offers a series of APIs for performing operations such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements.
The **DataStorage** module provides applications with data processing capability and allows applications to perform lightweight data storage and query. Data is stored in key-value (KV) pairs. Keys are of the string type, and values can be of the number, string, or Boolean type.
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module have been deprecated since API version 9 and are not recommended for use. An exception will be thrown if any of the APIs is called.
> - The APIs provided by this module have been deprecated since API version 9 and are not recommended for use. An exception will be thrown if any of the APIs is called.
## Modules to Import
...
...
@@ -12,7 +13,7 @@ import document from '@ohos.document';
## document.choose<sup>(deprecated)</sup>
choose(types?: string[]): Promise<string>
choose(types?: string[]): Promise<string>
Chooses files of the specified types using the file manager. This API uses a promise to return the result.
# @ohos.data.fileAccess (User File Access and Management)
The **fileAccess** module is a framework for accessing and operating user files based on the Extension ability mechanism. This module interacts with diverse file management services, such as the media library and external storage management service, and provides a set of file access and management APIs for system applications. The media library service allows access to user files on local devices and distributed devices. The external storage management service allows access to the user files stored on devices such as shared disks, USB flash drives, and SD cards.
The **secuityLabel** module provides APIs to manage file data security levels, including obtaining and setting file data security levels.
> **NOTE**<br/>
> **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 statfs module provides APIs for obtaining file system information, including the total number of bytes and the number of idle bytes of the file system.
The **statfs** module provides APIs for obtaining file system information, including the total number of bytes and the number of idle bytes of the file system.
> **NOTE**<br>
> **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 **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.
...
...
@@ -68,7 +68,7 @@ This is a system API and cannot be called by third-party applications.
| userId | number | No | User ID.<br>Value:<br>- Set this parameter to the ID of the user to be queried.<br>- If no value is specified, information about the current user is queried. |
| callback | callback: AsyncCallback<[StorageStats](#storagestats)> | Yes | Callback invoked to return the information obtained.|
| callback | AsyncCallback<[StorageStats](#storagestats9)> | Yes | Callback invoked to return the information obtained.|
**Example**
...
...
@@ -528,11 +528,11 @@ This is a system API and cannot be called by third-party applications.
This is a system API and cannot be called by third-party applications.
| Name | Type | Description |
| --------- | ------ | -------------- |
| total | number | Total space of the built-in memory card. |
| audio | number | Space occupied by audio data. |
| video | number | Space occupied by video data.|
| image | number | Space occupied by image data. |
| file | number | Space occupied by files. |
| app | number | Space occupied by application data.|
| Name | Type | Readable | Writable | Description |
# @ohos.filemanagement.userFileManager (User Data Management)
The **userFileManager** module provides user data management capabilities, including accessing and modifying user media data (audio and video clips, images, and files).
The volumeManager module provides APIs for volume and disk management, including obtaining volume information, mounting or unmounting volumes, partitioning disks, and formatting volumes.
> **NOTE**<br>
> **NOTE**
>
> - The initial APIs of this module are supported since API version 9.
> - API version 9 is a canary version for trial use. The APIs of this version may be unstable.
> - The APIs of this module are system APIs and cannot be called by third-party applications.
## Modules to Import
...
...
@@ -52,7 +51,7 @@ Asynchronously obtains information about all available volumes. This API uses a