• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to extract files from zip archive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to extract files from zip archive? (From: Vyacheslav Karamov <email@hidden>)

  • Prev by Date: Re: Why does NSArray count return NSUInteger?
  • Next by Date: Re: Autoreleased Data In Cocoa
  • Previous by thread: Re: How to extract files from zip archive?
  • Next by thread: Autoreleased Data In Cocoa
  • Index(es):
    • Date
    • Thread