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 

Print all files of dir to screen + read them

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



Joined: 24 Aug 2007
Posts: 88

PostPosted: Tue Jun 10, 2008 5:40 am    Post subject: Print all files of dir to screen + read them Reply with quote

Hi,

i got a question :
How do i get all files of 1 dir, print them and read each file (i know how to read it)

Tnx in advance !


Last edited by Question_dev on Tue Jun 10, 2008 7:15 am; edited 1 time in total
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Jun 10, 2008 6:36 am    Post subject: Reply with quote

The same way you do in any posix environment.
Back to top
View user's profile Send private message AIM Address
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Tue Jun 10, 2008 7:15 am    Post subject: Reply with quote

There are posts here to get all files, but the problem is that i don't know how to read each file .

tnx
Back to top
View user's profile Send private message
pspZorba



Joined: 22 Sep 2007
Posts: 156
Location: NY

PostPosted: Tue Jun 10, 2008 8:54 am    Post subject: Reply with quote

what do you mean ?

is it just open() read()/write() close() (or sceIoOpen, sceIoRead/sceIoWrite, sceoClose) you are looking for ?
_________________
--pspZorba--
NO to K1.5 !
Back to top
View user's profile Send private message
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Wed Jun 11, 2008 1:43 am    Post subject: Reply with quote

read. i got a read function, i only need the filepath of each file
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Jun 11, 2008 3:11 am    Post subject: Reply with quote

Just use the normal directory commands. You'll find examples of reading all the files in a directory in most PSP programs out. Even PSP Doom has such a thing. SHEESH! What's with all the noobie questions lately?!?
Back to top
View user's profile Send private message AIM Address
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Wed Jun 11, 2008 7:19 am    Post subject: Reply with quote

I'm just looking for a code snippet to get the filepath of each file. . .
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Jun 11, 2008 9:05 am    Post subject: Reply with quote

There are plenty of PSP programs with source included, and many of them have file requesters which have the code you want. Just look in a couple and you'll find all the code you need.
Back to top
View user's profile Send private message AIM Address
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Wed Jun 11, 2008 10:04 am    Post subject: Reply with quote

Here's one:
http://www.psp-programming.com/forums/index.php?topic=1333.0
and you didn't search hard because the same link has been posted for the same thing.
The file path string or file name only can be copied from within those functions.
_________________
If not actually, then potentially.
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