Re: How to extract files from zip archive?
Re: How to extract files from zip archive?
- Subject: Re: How to extract files from zip archive?
- From: Jim Thomason <email@hidden>
- Date: Mon, 30 May 2011 21:47:19 -0500
On Mon, May 30, 2011 at 10:45 AM, Vyacheslav Karamov
<email@hidden> wrote:
> Hi All!
> ...
> [task setLaunchPath:@"/usr/bin/unzip"];
> NSArray * args = [NSArray arrayWithObjects:@"-a ", listsPath, @" -d ",
> sharedPath, nil];
In addition to what others have said regarding spaces and such, when I
was looking around for this, most of the posts at various sources
suggested using ditto as opposed to unzip. Someone can correct me if
I'm wrong, but AFAIK unzip doesn't support resource forks (though you
can unzip 'em to a separate file), and there may be other metadata it
ignores/goofs up/forgets/etc.
Launching ditto to do this is easy:
[task setLaunchPath:@"/usr/bin/ditto"];
[task setArguments: [NSArray arrayWithObjects:@"-x", @"-k",
zipFilePath, someTargetDirectory, nil] ];
-Jim....
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden