List Archive
Thread
-
Iterate through directory in zip archive,
Sean Beck
(2013/07/26 16:29:16)
-
Re: Iterate through directory in zip archive,
Thomas Klausner
(2013/07/26 17:32:31)
-
Re: Iterate through directory in zip archive,
Sean Beck
(2013/07/26 18:28:41)
- Re: Iterate through directory in zip archive, Dieter Baron (2013/07/27 08:15:17)
- Re: Iterate through directory in zip archive, Sean Beck (2013/07/31 00:31:59)
- Message not available
- Re: Iterate through directory in zip archive, Paul Harris (2013/07/31 05:33:07)
-
Re: Iterate through directory in zip archive,
Sean Beck
(2013/07/26 18:28:41)
-
Re: Iterate through directory in zip archive,
Thomas Klausner
(2013/07/26 17:32:31)
Message
On Jul 26, 2013, at 20:28 , Sean Beck <seanmckaybeck%gmail.com@localhost> wrote: But I don't know the specific names of the directories: just the base dir. Zip archvies don't contain a proper directory structure, just a list of files with complete path names, stored in no particular order. For example: dir1/subdir1/file1 dir2/file3 dir2/file2 dir1/subdir2/file1 dir1/subidr1/file2 libzip let's you iterate over this list: zip_int64_t num_entries = zip_get_num_entries(za, 0); for (zip_uint64_t i = 0; i < (zip_uint64_t)num_entries; i++) { const char *name = zip_get_name(za, i, 0); // use name } You can split name on '/' into path comonents and filter those you're interested in, or build your own directory structure. yours, dillo
|
Made by MHonArc.