Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

ZipFolder problem

Moderators: kris

Posted: 03/26/10 16:41:28


I'm in the need to unpack a zip, which contains some text files that need to be read.

From the wiki I found that code sample to read the content of zip files. I can read the names of the files included within the zip file. However, I tried to access the input stream returned from the archive.tree.catalog, but get the following error:

"cannot operate on closed zlib stream"

Below is the sample code I used to access the content of each file contained in the zip.

auto archive = new ZipFolder(file);
auto info = archive.tree();
foreach (file; info.catalog()) 
    foreach (idx, line; new Lines!(char) (file.input))
        // Stdout.format("{}", line[0]);	    		 

thanks Lars

There are no responses to display.