IOS の代わりに Mac で SSZipArchive または ZipArchive を使用せずに、zip ファイルをある場所から別の場所に移動したいと考えています。
NSFileManager を使用しようとしましたが、機能しません。コードは次のとおりです。
//Zip file path
NSBundle* bundle = [[NSBundle mainBundle]autorelease];
_sourcePath = [bundle pathForResource:@"NAME" ofType:@"zip"];
//Saved destination path - saved into USB
_destinationPath = [[NSUserDefaults standardUserDefaults]stringForKey:@"saveDestinationPath"];
//Add new folder name for destination
_destinationPath = [NSString stringWithFormat:@"%@/Goal",_destinationPath];
//NSFileManager
[[NSFileManager defaultManager]copyItemAtPath:_sourcePath toPath:_destinationPath error:nil];
新しい「目標」フォルダーを作成しないと、その zip ファイルはコピーまたは移動されません。そのフォルダーを追加すると、使用している関数 (copyItem または moveItem) に関係なく、USB ドライブに zip ファイルではなく Unix 実行可能ファイルが取得されます。これがスクリーンショットです。
ありがとう !!!!