Hi, Anyone knows a way to browser a folder that is compressed in a zip?
I'm using the unzip library to browse a zip file, but what happens if there is a folder in the zip file and i wan't to see what files are inside that folder. Do I have to uncompress all the folder first? Well hope someone can help? Thanks in advance!!
Browser a folder compressed in zip!!
The unzip library (which one do you use? I use the one created by Gilles Vollant) organizes folders and files in the form of a linear list instead of a tree list.
Suppose I have a zip file containing the following folders and files:
Where [+] denote a folder and * denote a file.
When I browse the zip file using unzGoToFirstFile followed by unzGoToNextFile and unzGetCurrentFileInfo continuously, I will get some entries with the following filenames:
Then, you can create your own tree list using these filenames. The hint is that, all folder entries are with uncompressed size 0B.
After creating the tree list, you can select whatever folders you want and display the files inside.
Hope this can help you.
Suppose I have a zip file containing the following folders and files:
Code: Select all
[+]My folder
*Main.cpp
*Tex.png
[+]Scrshot
*Scrshot001.png
[+]My App
*Eboot.pbp
When I browse the zip file using unzGoToFirstFile followed by unzGoToNextFile and unzGetCurrentFileInfo continuously, I will get some entries with the following filenames:
Code: Select all
My folder/
My folder/Main.cpp
My folder/Tex.png
My folder/Scrshot/
My folder/Scrshot/ Scrshot001.png
My App/
My App/Eboot.pbp
After creating the tree list, you can select whatever folders you want and display the files inside.
Hope this can help you.