iOS什么时候清理本地应用程序./tmp目录? [英] When does iOS clean the local app ./tmp directories?

查看:865
本文介绍了iOS什么时候清理本地应用程序./tmp目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么时候iOS清理本地应用程序 ./ tmp 目录?



请注意,这不是一个愚蠢的这个问题。我问的是特定于应用程序的临时文件夹,而不是系统范围内的文件夹。



您可以使用 iExplorer 查看 $ b

(注意:我出于好奇而问这个问题只有我怀疑这些永远不会被删除,除非你从备份恢复你的手机或重新安装该特定的应用程序,但显然你不能指望半永久存储缓存的文件)

b $ b

解决方案

根据 documentation ,它 可以<如果应用程序未执行,那么系统可能会从该目录中清除延迟的文件。

应用程序是没有运行。

假设a)您的应用程序未运行是合乎逻辑的;和b)您的设备运行时存储空间不足,那么很可能系统会在 清除< Application_Home> / tmp /

值得注意的是,文档指出:

lockquote

你的应用程序应该从这个目录中删除文件,当它确定他们不再需要。


这里的重点是应用程序开发人员做他们自己的家务,不让操作系统在他们之后收拾。

When does iOS clean the local app ./tmp directory?

Note that this is not a dupe of this question. I'm asking about the app specific temporary folder, not the system wide one.

You can use iExplorer to have a look at ./tmp directories on non-jailbroken phones.

(Note: I'm asking this out of curiosity only. I kind of suspect that these never get deleted unless you restore your phone from a backup or reinstall that particular app. But obviously you cannot count on that for semi-permanently storing cached files.)

解决方案

According to the documentation, it could be any time, if the app is not executing:

The system may also purge lingering files from this directory when your app is not running.

It's logical to assume if a) your app is not running; and b) your device is running low on storage, then it's highly likely the system will, at some point, purge the contents of <Application_Home>/tmp/.

It's also worth noting that the documentation states:

Your app should remove files from this directory when it determines they are no longer needed.

The emphasis here being on the app developer to do their own housekeeping and not leave it for the OS to tidy up after them.

这篇关于iOS什么时候清理本地应用程序./tmp目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆