在Harmony NEXT应用中,如何实现应用的持久化存储?

阅读 738
1 个回答

通过PersistentStorage类实现管理应用持久化数据,可以将特定标记的持久化数据链接到AppStorage中,并由AppStorage接口访问对应持久化数据。PersistentStorage持久化后的数据会生成本地xml文件保存,文件路径为/data/app/el2/100/base/<bundleName>/haps/<hapName>/files/persistent_storage。