forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Browser a folder compressed in zip!!

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
theHobbit



Joined: 30 Sep 2006
Posts: 65

PostPosted: Fri Jun 22, 2007 4:02 am    Post subject: Browser a folder compressed in zip!! Reply with quote

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
View user's profile Send private message
Yodajr



Joined: 24 Sep 2005
Posts: 13

PostPosted: Wed Jun 27, 2007 7:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Jun 28, 2007 8:36 am    Post subject: Reply with quote

http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Tong



Joined: 20 Apr 2007
Posts: 10

PostPosted: Fri Jul 06, 2007 12:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group