有谁知道沙箱目录怎么获取

沙箱目录怎么获取

HarmonyOS
2024-01-30 19:09:54
浏览
已于2024-1-31 23:35:51修改
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
echenz

沙箱目录提供files(文件)、cache(缓存)、temp(临时)、preferences(数据库)文件目录。

let “文件沙箱目录” = getContext(this).filesDir; 
let “缓存文件沙箱目录” = getContext(this).cacheDir; 
let “临时文件沙箱目录” = getContext(this).tempDir; 
let “数据库文件沙箱目录” = getContext(this).preferencesDir;
分享
微博
QQ
微信
回复
2024-01-31 23:33:01