| View previous topic :: View next topic |
| Author |
Message |
theHobbit
Joined: 30 Sep 2006 Posts: 65
|
Posted: Fri Jun 22, 2007 4:02 am Post subject: Browser a folder compressed in zip!! |
|
|
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!! |
|
| Back to top |
|
 |
Yodajr
Joined: 24 Sep 2005 Posts: 13
|
Posted: Wed Jun 27, 2007 7:49 pm Post subject: |
|
|
| Quote: | | I'm using the unzip library to browse a zip file |
Sorry for that, but how do you do that ? ;) _________________ Tutorials about OSLib here |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
|
| Back to top |
|
 |
Tong
Joined: 20 Apr 2007 Posts: 10
|
Posted: Fri Jul 06, 2007 12:38 pm Post subject: |
|
|
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:
| Code: |
[+]My folder
*Main.cpp
*Tex.png
[+]Scrshot
*Scrshot001.png
[+]My App
*Eboot.pbp |
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:
| Code: | My folder/
My folder/Main.cpp
My folder/Tex.png
My folder/Scrshot/
My folder/Scrshot/ Scrshot001.png
My App/
My App/Eboot.pbp |
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. |
|
| Back to top |
|
 |
|