【发布时间】:2015-08-11 09:30:36
【问题描述】:
我想将文档目录中的所有类型的文件复制到ios中的另一个目录,
if ([fileManager fileExistsAtPath:txtPath] == YES) {
[fileManager removeItemAtPath:txtPath error:&error];
}
NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"txtFile" ofType:@"txt"];
[fileManager copyItemAtPath:resourcePath toPath:txtPath error:&error];
我使用此代码但它仅对特定类型的文件有帮助。
【问题讨论】:
-
您好,下面的链接可以帮助您。 stackoverflow.com/questions/7440662/…
-
感谢朋友的帮助