Create ZipArchive from memory filesystem

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

Create ZipArchive from memory filesystem

Markus Fritsche-4
Hello,

is there a quick way to create a zip file from a memory filesystem that
I can't see, or are the *Archive classes not compatible with the new
filesystem api yet?

Best regards,
   Markus

Reply | Threaded
Open this post in threaded view
|

Re: Create ZipArchive from memory filesystem

Yuriy Mironenko
I'm not sure what "memory filesystem that I can't see" exactly is.

2014-12-12 16:54 GMT+03:00 Markus Fritsche <[hidden email]>:
Hello,

is there a quick way to create a zip file from a memory filesystem that I can't see, or are the *Archive classes not compatible with the new filesystem api yet?

Best regards,
  Markus

Reply | Threaded
Open this post in threaded view
|

Re: Create ZipArchive from memory filesystem

Tommaso DS

On 14/12/14 22:58, Юрий Мироненко wrote:
> I'm not sure what "/memory filesystem that I can't see/" exactly is.
>
I think he means "/a way that//I can't see/ to create a zip file from a
memory filesystem" (but I don't know the answer)
Tommaso

> 2014-12-12 16:54 GMT+03:00 Markus Fritsche <[hidden email]
> <mailto:[hidden email]>>:
>
>     Hello,
>
>     is there a quick way to create a zip file from a memory filesystem
>     that I can't see, or are the *Archive classes not compatible with
>     the new filesystem api yet?
>
>     Best regards,
>       Markus
>


Reply | Threaded
Open this post in threaded view
|

Re: Create ZipArchive from memory filesystem

Blondeau Vincent
In reply to this post by Markus Fritsche-4
Hello Markus,

You should be able to create a zip file with the memory file system with the classes located in "FileSystem-Zip" by doing for example :
| zipFile zip |
zipFile := FileSystem memory workingDirectory / 'test.zip'.
zip := (FileSystem zip: zipFile) open.
zip / 'sample.txt'
writeStreamDo: [ :stream |
stream nextPutAll: 'test' ];
yourself.

But you can't read easily the content of the archive...
The *Archive classes are more complete but they seems indeed not compatible to the new file system api.

See https://pharo.fogbugz.com/f/cases/14106/Fix-bugs-in-ZipFileSystem if you want to improve the zip file system.

Best regards,

Vincent


-----Message d'origine-----
De : Pharo-users [mailto:[hidden email]] De la part de Markus Fritsche
Envoyé : vendredi 12 décembre 2014 14:54
À : [hidden email]
Objet : [Pharo-users] Create ZipArchive from memory filesystem

Hello,

is there a quick way to create a zip file from a memory filesystem that I can't see, or are the *Archive classes not compatible with the new filesystem api yet?

Best regards,
   Markus



Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

Reply | Threaded
Open this post in threaded view
|

Re: Create ZipArchive from memory filesystem

Markus Fritsche-4
Hello Vincent,

On 2014-12-15 10:23, Blondeau Vincent wrote:
> Hello Markus,
> But you can't read easily the content of the archive...
> The *Archive classes are more complete but they seems indeed not
> compatible to the new file system api.

thank you for your reply, that was exactly what I was looking for!

I'll check the fogbugz entry "ASAP", which is pretty unsoonish
unfortunately...

Kind regards,
   Markus