Print all files of dir to screen + read them

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Question_dev
Posts: 88
Joined: Fri Aug 24, 2007 8:23 pm

Print all files of dir to screen + read them

Post by Question_dev »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

The same way you do in any posix environment.
Question_dev
Posts: 88
Joined: Fri Aug 24, 2007 8:23 pm

Post by Question_dev »

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

tnx
pspZorba
Posts: 156
Joined: Sat Sep 22, 2007 11:45 am
Location: NY

Post by pspZorba »

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 !
Question_dev
Posts: 88
Joined: Fri Aug 24, 2007 8:23 pm

Post by Question_dev »

read. i got a read function, i only need the filepath of each file
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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?!?
Question_dev
Posts: 88
Joined: Fri Aug 24, 2007 8:23 pm

Post by Question_dev »

I'm just looking for a code snippet to get the filepath of each file. . .
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Here's one:
http://www.psp-programming.com/forums/i ... pic=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.
Post Reply