[Pharo-Users] Unzip a file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Pharo-Users] Unzip a file

Valentin Ryckewaert
Hi,

I'm trying to unzip a file I did this :
GZipReadStream unzip:'aPath/myZip.zip' to: 'aPath/test' asFileReference

It's not working and I don't really understand the doc of the method, why does unzip want as first argument the name of the file only?

Valentin
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-Users] Unzip a file

CyrilFerlicot


On 19/04/2016 14:48, Valentin Ryckewaert wrote:
> Hi,
>
> I'm trying to unzip a file I did this :
> GZipReadStream unzip:'aPath/myZip.zip' to: 'aPath/test' asFileReference
>
> It's not working and I don't really understand the doc of the method,
> why does unzip want as first argument the name of the file only?
>
> Valentin

Hi,

PharoLauncher uses:

        ZipArchive new
                readFrom: zipFile;
                extractAllTo: aDirectory.

--
Cyril Ferlicot

http://www.synectique.eu

165 Avenue Bretagne
Lille 59000 France


signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-Users] Unzip a file

stepharo
In reply to this post by Valentin Ryckewaert


Le 19/4/16 14:48, Valentin Ryckewaert a écrit :
> Hi,
>
> I'm trying to unzip a file I did this :
> GZipReadStream unzip:'aPath/myZip.zip' to: 'aPath/test' asFileReference
>
> It's not working and I don't really understand the doc of the method,
> why does unzip want as first argument the name of the file only?

apparently unzip: to: expect two strings
At least this is the impression that I have when reading the code.
If this is the case then the methods arguments should be renamed.
>
> Valentin


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-Users] Unzip a file

Ben Coman
In reply to this post by Valentin Ryckewaert
I've not used any compression stuff in Pharo, but be aware that GZip
(*.gz files) is not Zip (*.zip files).

http://www.differencebetween.net/technology/difference-between-zip-and-gzip/

cheers -ben

On Tue, Apr 19, 2016 at 8:48 PM, Valentin Ryckewaert
<[hidden email]> wrote:
> Hi,
>
> I'm trying to unzip a file I did this :
> GZipReadStream unzip:'aPath/myZip.zip' to: 'aPath/test' asFileReference
>
> It's not working and I don't really understand the doc of the method, why
> does unzip want as first argument the name of the file only?
>
> Valentin