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

!17993 [翻译完成】#I6W9F5

Merge pull request !17993 from Annie_wang/PR17302
......@@ -10,7 +10,9 @@ The **Preferences** module provides APIs for processing data in the form of key-
User applications call **Preference** through the JS interface to read and write data files. You can load the data of a **Preferences** persistence file to a **Preferences** instance. Each file uniquely corresponds to an instance. The system stores the instance in memory through a static container until the instance is removed from the memory or the file is deleted. The following figure illustrates how **Preference** works.
**Figure 1** Preferences working mechanism
The preference persistent file of an application is stored in the application sandbox. You can use **context** to obtain the file path. For details, see [Obtaining the Application Development Path](../application-models/application-context-stage.md#obtaining-the-application-development-path).
**Figure 1** Preferences working mechanism
![preferences](figures/preferences.jpg)
......@@ -245,4 +247,4 @@ The following table lists the APIs used for preferences data persistence. Most o
} catch (err) {
console.error(`Failed to delete preferences. Code:${err.code}, message:${err.message}`);
}
```
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册