Hi Juraj,

The file streams opened in a memory file system are not polymorphic with
the ones in a disk file system :(.

Can you open an issue and assing it to me? I'll work soon on making all of
them work and yield binary streams.

On Wed, Nov 29, 2017 at 9:06 PM, Juraj Kubelka <juraj.kube...@icloud.com>
wrote:

> Hi,
>
> I can successfully use ZipArchive like the following
>
> -=-=-
> zip := ZipArchive new.
> { 'file1.txt'. 'file2.txt'. 'file3.txt' } do: [ :eachFile |
>         | member |
>         member := zip addString: eachFile, ' contents' as: eachFile.
>         member desiredCompressionMethod: ZipArchive compressionDeflated ].
> file := FileLocator temp / 'archive.zip'.
> zip writeTo: file writeStream.
> file.
> -=-=-
>
> What I should do to make it work while using FileSystem memory?
>
> -=-=-
> zip := ZipArchive new.
> { 'file1.txt'. 'file2.txt'. 'file3.txt' } do: [ :eachFile |
>         | member |
>         member := zip addString: eachFile, ' contents' as: eachFile.
>         member desiredCompressionMethod: ZipArchive compressionDeflated ].
> fileSystem := FileSystem memory.
> file := fileSystem root / 'archive.zip'.
> file writeStreamDo: [ :stream |
>         zip writeTo: stream ].
> -=-=-
>
> There is "Improper store into indexable object” as it tries to store a
> number in ByteString.
> Thanks!
> Juraj
>
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
<http://www.cnrs.fr>*


*Web:* *http://guillep.github.io* <http://guillep.github.io>

*Phone: *+33 06 52 70 66 13

Reply via email to