是否可以使用 NSFileManager.defaultManager().copyItemAtPath 将捆绑目录(网站结构)复制到 NSTemporaryDirectory,或者我需要执行递归函数来逐个复制文件?
我的目标是 iOS 8 和 9,并且使用的是 Swift 2。
我在 Google 上进行了搜索,但我发现的所有内容都与单个文件副本有关,但没有涉及从 bundle 到应用程序容器的完整文件夹结构。
提前致谢!
最佳答案
您阅读过 copyItemAtPath(_:error:)
的文档吗?
If the item at srcPath is a directory, this method copies the directory and all of its contents, including any hidden files.
关于ios - 如何将包目录保存到 NSTemporaryDirectory(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33856038/