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 |
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 <[hidden email]> wrote: Hi,
|
On Thu, Nov 30, 2017 at 10:10 AM, Guillermo Polito <[hidden email]> wrote:
Hi, In July I opened this issue: https://pharo.fogbugz.com/f/cases/20253/MemoryFileSysteFile-shuold-return-a-MultiByteFileStream-as-readStream If you open another one, you can close this one. Or maybe just rename this one with the stream class you intend to use.
Cyril Ferlicot
https://ferlicot.fr http://www.synectique.eu 2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France |
In reply to this post by Guillermo Polito
Thank you Guillermo. I see that you already assigned the case https://pharo.fogbugz.com/f/cases/20253/MemoryFileSysteFile-shuold-return-a-MultiByteFileStream-as-readStream
Cheers, Juraj
|
Free forum by Nabble | Edit this page |