| View previous topic :: View next topic |
| Author |
Message |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Tue Jun 10, 2008 5:40 am Post subject: Print all files of dir to screen + read them |
|
|
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 |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Tue Jun 10, 2008 6:36 am Post subject: |
|
|
| The same way you do in any posix environment. |
|
| Back to top |
|
 |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Tue Jun 10, 2008 7:15 am Post subject: |
|
|
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 |
|
 |
pspZorba
Joined: 22 Sep 2007 Posts: 156 Location: NY
|
Posted: Tue Jun 10, 2008 8:54 am Post subject: |
|
|
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 |
|
 |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Wed Jun 11, 2008 1:43 am Post subject: |
|
|
| read. i got a read function, i only need the filepath of each file |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Jun 11, 2008 3:11 am Post subject: |
|
|
| 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 |
|
 |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Wed Jun 11, 2008 7:19 am Post subject: |
|
|
| I'm just looking for a code snippet to get the filepath of each file. . . |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Jun 11, 2008 9:05 am Post subject: |
|
|
| 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 |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Wed Jun 11, 2008 10:04 am Post subject: |
|
|
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 |
|
 |
|