我想将所选文件从我的计算机复制到同一网络上的另一台计算机。我尝试使用 NSFileManager 但没有成功。请帮忙怎么做?
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSString * filePath = [NSHomeDirectory() stringByAppendingPathComponent:
[NSString stringWithFormat:@"Documents/test"]];
NSString * filePath2 = [NSHomeDirectory() stringByAppendingPathComponent:
[NSString stringWithFormat:@"Shared/Test"]];
[fileManager copyItemAtPath:filePath toPath:filePath2 error:NULL];
[fileManager release];