iPhone存储在tmp目录中 [英] iPhone storage in tmp directory

查看:159
本文介绍了iPhone存储在tmp目录中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题来自这个关于iPhone存储的stackoverflow问题。就像我已经尝试回答的那样,我们可以在tmp目录中缓存数据。但评论说,当操作系统发生时,数据可以被删除。我完全不明白评论所说的问题。

I have a question from this stackoverflow question about iPhone storage. Like I already tried to answer, we can cache data in tmp directory. But a comment says that the data can be deleted when OS whimp. I don't understand exactly the problem that the comment says.

我想询问操作系统删除tmp目录的过程是手动还是自动。换句话说,如果系统自动检测到我们的tmp目录必须被删除。

I want to ask if the process of OS deleting tmp directory is manually or automatically. In other words, if the system auto detect that our tmp directory has to be deleted.

另一个问题是,如果我们可以控制或被要求做一些事情(在删除过程之前),这可以帮助我们保留tmp目录。

Another question is that if we can control, or be asked to do something (before the deleting process) that can help us to keep the tmp directory.

另一个问题是,如果我们无法做任何事情,那么操作系统会在多长时间内做到这一点

Another question is that if we can not do anything then how often the OS will do that, under what circumstances

推荐答案

操作系统将在重启时和其他不确定点删除临时目录。如果您需要存储您不想备份的某个地方,请使用缓存目录。这将不会被删除,也不会被备份。

The OS will delete the temp directory on restart and at other indeterminate points. If you need to store something somewhere that you don't want backed up then use the cache directory. That will not be deleted and will not be backed up.

当删除临时文件时,您的应用程序将不会运行,您也没有机会对该删除做出反应。这在所有基于unix的平台上都是相当常见的行为(OS X也会这样做)。

Your application will not be running when the temp is deleted nor will you have an opportunity to react to that deletion. This is fairly common behavior on all unix based platforms (OS X does this as well).

这篇关于iPhone存储在tmp目录中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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