gpt4 book ai didi

iphone - 应用程序打开时,系统是否可以删除 NSCachesDirectory 的内容?

转载 作者:搜寻专家 更新时间:2023-10-30 20:19:55 26 4
gpt4 key购买 nike

作为标题。

我存储在 NSCachesDirectory 中的文件是否有可能被系统删除(即在低存储情况下),当我在前台运行时?

最佳答案

File System programming guide

On iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is very low on disk space. This will never occur while an app is running. However, you should be aware that iTunes restore is not necessarily the only condition under which the Caches directory can be erased.

所以答案是 - 不,当应用程序在前台运行时,NSCachesDirectory 是不可能被删除的。

但是,关于在后台运行的应用程序,他们的措辞有些含糊。

关于iphone - 应用程序打开时,系统是否可以删除 NSCachesDirectory 的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14609266/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com