Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Graham Cox
Thanks to everyone who chipped in on this one. I have what I want working using ditto with NSTask. I've hard-coded the launch path to /usr/bin/ditto and of course, that works right now. I guess as long as that isn't likely to change in 10.7 and was also the same in 10.5 then I'll be fine. I mi

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Karl Moskowski
If Zip is an acceptable substitute for gzip, you can use my BSD-licensed ZipKit FW. Works on Mac (as a FW or static lib, GC supported) and iPhone (as a static lib), has file-based and in-memory zipping classes, supports Zip64 and is cancellable. There's not much in terms of docs (just a How to U

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Charles Srstka
Something interesting I’ve noticed is that 10.6 now includes libarchive in /usr/lib, which would allow one to create tar files and the like without having to launch a shell tool. Unfortunately, Apple doesn’t seem to have included the headers for it, which may mean that they intend it to be priva

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread John Joyce
On Jun 8, 2010, at 5:40 AM, Alastair Houghton wrote: > On 8 Jun 2010, at 07:25, Graham Cox wrote: > >> On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote: >> >>> b) In a working OS X system, the unix executables will always be where >>> they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sb

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Alastair Houghton
On 8 Jun 2010, at 07:25, Graham Cox wrote: > On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote: > >> b) In a working OS X system, the unix executables will always be where >> they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sbin, etc). > > Thanks Stephen, so given the four choices I look

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread glaurent
On Tue 08/06/10 08:34, "Graham Cox" graham@bigpond.com wrote: > > On 08/06/2010, at 4:21 PM, John Joyce wrote: > > > which > > > > and that will let you locate the actual path of the > command line tool you want to use. (pass that path to your next > NSTask) > > Ok... but doesn't that just

Re: OK, break it down for me... (question about gzip)

2010-06-07 Thread Kyle Sluder
On Jun 7, 2010, at 11:04 PM, Graham Cox wrote: I need to be able to make a .gzip file from a FOLDER on my hard disk programatically. I would use ditto to produce the tarball, because it will produce the same results as the Finder. --Kyle Sluder (Sent from my hotel room at WWDC, where you

Re: OK, break it down for me... (question about gzip)

2010-06-07 Thread Graham Cox
On 08/06/2010, at 4:21 PM, John Joyce wrote: > which > > and that will let you locate the actual path of the command line tool you > want to use. (pass that path to your next NSTask) Ok... but doesn't that just displace the problem one step? How do I find the path to without being able to r

Re: OK, break it down for me... (question about gzip)

2010-06-07 Thread Graham Cox
On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote: > b) In a working OS X system, the unix executables will always be where > they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sbin, etc). Thanks Stephen, so given the four choices I looked at each and find zip in /usr/bin The question i

Re: OK, break it down for me... (question about gzip)

2010-06-07 Thread John Joyce
On Jun 8, 2010, at 1:16 AM, Stephen J. Butler wrote: > On Tue, Jun 8, 2010 at 1:04 AM, Graham Cox wrote: >> I need to be able to make a .gzip file from a FOLDER on my hard disk >> programatically. > > a) You can't gzip a folder. That's why people tar the folders, then > gzip the tar file (or j

Re: OK, break it down for me... (question about gzip)

2010-06-07 Thread Graham Cox
It has been pointed out to me off-list that I've been labouring under the misapprehension that gzip is equivalent to zip, which appears not to be the case. It might explain why it was hard to find relevant info. So I need zip then... otherwise same discussion applies. I don't really care how I

Re: OK, break it down for me... (question about gzip)

2010-06-07 Thread Stephen J. Butler
On Tue, Jun 8, 2010 at 1:04 AM, Graham Cox wrote: > I need to be able to make a .gzip file from a FOLDER on my hard disk > programatically. a) You can't gzip a folder. That's why people tar the folders, then gzip the tar file (or just use the 'z' option in tar). b) In a working OS X system, the

OK, break it down for me... (question about gzip)

2010-06-07 Thread Graham Cox
I need to be able to make a .gzip file from a FOLDER on my hard disk programatically. I've searched the archives and Googled for it, and now I'm just confused. Some folk advocate linking to the library directly, other to invoke it via NSTask. Since it's a folder I need to compress, not in-memor