[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

tar with ruby

Tomas Fischer

2/27/2006 10:44:00 PM

Hi,

I have started using ruby.
A current task is to get a tar.gz file from internet and extract it.
I find the zlib class und so I can extract the downloaded file to
a .tar one.

How can I extract this file?
I found old postings on groups.google which use
Archive::Tar::Minitar. Is this still the way to handle tar file with
ruby,
or are there classes in standard lib?

What is the ruby-way: Install the extra package or call external program
tar (my ruby program is suggested to run only on Linux plattforms)?

Thanks,
Tomas

--
Posted via http://www.ruby-....


2 Answers

Eric Hodel

2/27/2006 11:25:00 PM

0

On Feb 27, 2006, at 2:44 PM, Tomas Fischer wrote:

> Hi,
>
> I have started using ruby.
> A current task is to get a tar.gz file from internet and extract it.
> I find the zlib class und so I can extract the downloaded file to
> a .tar one.
>
> How can I extract this file?
> I found old postings on groups.google which use
> Archive::Tar::Minitar. Is this still the way to handle tar file with
> ruby,
> or are there classes in standard lib?
>
> What is the ruby-way: Install the extra package or call external
> program
> tar (my ruby program is suggested to run only on Linux plattforms)?

I tend to favor calling external programs when I know they'll be there.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...




Austin Ziegler

2/28/2006 1:26:00 AM

0

On 2/27/06, Eric Hodel <drbrain@segment7.net> wrote:> On Feb 27, 2006, at 2:44 PM, Tomas Fischer wrote:> > How can I extract this file?> > I found old postings on groups.google which use> > Archive::Tar::Minitar. Is this still the way to handle tar file with> > ruby,> > or are there classes in standard lib?> >> > What is the ruby-way: Install the extra package or call external> > program> > tar (my ruby program is suggested to run only on Linux plattforms)?>> I tend to favor calling external programs when I know they'll be there....whereas I tend to prefer a pure Ruby approach. I plan on improvingArchive::Tar::Minitar in the near future anyway and have been givensome partial support for symbolic links.-austin--Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca