更新时间:2023-01-19 15:45:52
如何防止数据库被替换?
how do I prevent the database from being replaced?
在复制数据库之前检查目标.如果那里已经有文件,请不要进行复制.您可以使用-[NSFileManager fileExistsAtPath:]
检查现有文件.
Check the destination before you copy the database. If there's already a file there, don't do the copy. You can use -[NSFileManager fileExistsAtPath:]
to check for an existing file.