简体   繁体   English

删除后文档中的文件目录

[英]File in documents Directory after deletion

我在ios设备的文档目录中创建了一个sqlite文件[或任何文件]。如果我从设备中删除了应用程序(删除),该文件会保留还是被删除?

The sandbox of an application deletes automatically when you delete the app. 删除应用程序时,应用程序的沙箱会自动删除。 It happens in both your device and in iOS simulator. 它发生在您的设备和iOS模拟器中。

Documents directory allows you to store files and subdirectories your app creates or may need, for example a database. Documents目录允许您存储应用创建或可能需要的文件和子目录,例如数据库。

Your application works in a sandbox environment. 您的应用程序在沙箱环境中工作。 When you delete the application in simulator or device, the directory that was created by application is deleted and so do the files residing in it. 在模拟器或设备中删除应用程序时,应用程序创建的目录将被删除 ,驻留在其中的文件也将被删除

When you reset your simulator you can find the deleted files in the trash. 重置模拟器后,您可以在垃圾箱中找到已删除的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM