 |
|
Posted: 03/26/10 16:41:28
hello,
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())
{
Stdout.formatln("{}", file.name);
foreach (idx, line; new Lines!(char) (file.input))
{
// Stdout.format("{}", line[0]);
}
}
thanks Lars
|
There are no responses to display.
|
 |
 |
|
 |
Copyright © 2006-2021 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic