Le 20/11/2015 21:44, Juraj Kubelka a écrit :

On Nov 20, 2015, at 17:36, Thierry Goubier
<thierry.goub...@gmail.com> wrote:

Le 20/11/2015 21:16, Juraj Kubelka a écrit :
If I remember well, ZIP in Pharo supports only one file (one
stream of data). There is no support for directories. At least,
when I have intended it some time ago, I failed.

No, zip in Pharo works with directories. However I think the zip
Filesystem doesn't work which means you have to manipulate the zip
members with the zip API, not as a filesystem.

Can you give me an example? The file has about 30.000 files
(compressed less then 50 MB). I am not sure if it is good idea to
manage this inside of Pharo image.

The code you'll be using is the one Metacello uses for its github and bitbucket urls, so I think it should handle it.

The Metacello example is just:

extractRepositoryFrom: zipFile to: directory
    "unzip <zipFile> into <directory>"
        ZipArchive new
                readFrom:  zipFile;
                extractAllTo: directory asFileReference.

As simple as that.

So testing will be easy.

Note that MetacelloPlatform also has the OSProcess-based unzip as well ;)


I do not stand on using *.tar.gz, but I have not found better
solution for my setup: Directory is compressed on Linux machine
and should be extracted on any machine by using local tools.

Do I miss some feature in Pharo?

I think you do ;)

Better :-)

Tell us how it goes anyway ;)

Thierry

Cheers, Juraj


Reply via email to