沙箱目录怎么获取?

沙箱目录怎么获取?

阅读 473
1 个回答

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

let “文件沙箱目录” = getContext(this).filesDir;   
let “缓存文件沙箱目录” = getContext(this).cacheDir;   
let “临时文件沙箱目录” = getContext(this).tempDir;   
let “数据库文件沙箱目录” = getContext(this).preferencesDir;
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题