复制资源中的文件夹 [英] copy a folder in resource
本文介绍了复制资源中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在用可可粉开发一个应用程序,该应用程序需要将添加到资源的文件夹复制到系统/库中的其他位置。如何指定源路径和目标路径。寻找解决方法
I am developing an application in cocoa which needs to copy a folder added to resource to other location in System/library .How can i specify the source and destination path.Looking for a solution
预先感谢
推荐答案
您将使用 NSFileManager
有非常好的便捷方法。有这样的方法
You'd use NSFileManager
which has really nice convenient methods. There is method like
- (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error
这是苹果文档中对它的描述:
And here's the description of it from apple docs:
将给定路径中指定的目录或文件复制到另一个路径所标识的文件系统中的其他位置。
这篇关于复制资源中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文