Le 07/02/2014 09:30, Max Leske a écrit :
On 07.02.2014, at 06:38, Tudor Girba <tudor@tudorgirba.com <mailto:tudor@tudorgirba.com>> wrote:
One more question: How do I read the contents of a file from within a zip?
I try this on regular zip files created both on Mac and on Windows: zipFile := FileSystem disk workingDirectory / 'tmp.zip'. zip := (FileSystem zip: zipFile) open. (zip / 'sample.txt') readStreamDo: [ :s | s contents ]
The problem is that I get an encoded stream. How do I decode it?
No idea. I donât think that anybody used it after Lukas wrote it. So itâs quite possible that itâs not even fully functional. But if it isnât, then there are a lot of test cases missing (if there are any at all) and we should start writing some right now.
I use it in gitfiletree to load packages from a git repository. I access ZipArchive directly. It works. Never noticed it had a FileSystem interface. I use convertFromSystemString on the contents to correctly read UTF8 data. Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95