【发布时间】:2010-04-14 15:00:13
【问题描述】:
我正在 cocoa 中开发一个应用程序,它需要将添加到资源的文件夹复制到系统/库中的其他位置。如何指定源和目标路径。寻找解决方案
提前致谢
【问题讨论】:
标签: cocoa
我正在 cocoa 中开发一个应用程序,它需要将添加到资源的文件夹复制到系统/库中的其他位置。如何指定源和目标路径。寻找解决方案
提前致谢
【问题讨论】:
标签: cocoa
我正在 cocoa 中开发一个应用程序,它需要将添加到资源的文件夹复制到 System/library 中的其他位置。
【讨论】:
你会使用NSFileManager,它有非常方便的方法。有像
- (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error
这是来自苹果文档的描述:
Copies the directory or file specified in a given path to a different location in the file system identified by another path.
【讨论】: