PSP Pro GamerZ

For all your PSP Needs
AKA Team Unknown Forum
 
HomeFAQRegisterLog in
---- Welcome to Team Unknown's official Forum, Don't forget to Register on the forum. Be sure to check out all of our projects such as uo DSONPSP and DigiPSP Also Check out our PSP Programming Tutorials Very Happy ----

Share | 
 

 [Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial]

Go down 
AuthorMessage
KaZ
Admin
avatar

Posts : 131
Points : 204
Join date : 2010-09-20
Location : In The Sky

PostSubject: [Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial]   Thu Oct 07, 2010 8:26 am

Yeh So in this tutorial we will be learning I/O Functions Very Happy:D
[Tutorial incomplete]

Right so now were on Part 4 of C++ tutorials all by KaZ Smile
First of all you will have to have this along with all you're other headers if you use io functions
Code:
#include <pspiofilemgr.h>

ok so now i'll explain a bit about the io functions

sceIoOpen()
This command opens a file for reading/writing/and other suff, It returns the File ID when used.
it opens stuff basicly and you can use it for detection code Wink

SceUID sceIoOpen(const char *file, int flags, SceMode mode);

const char *file
This is the filename including its path (/blah/blah/test.txt)
basicly file equals the path so like this. file = blahhh.txt

int flags
This part of the command is where you define what your going to do with the file, and you may use these flags as defined in pspiofilemgr_fcntl.h:

PSP_O_RDONLY - Only opens file for reading
PSP_O_WRONLY - Only opens file for writing
PSP_O_RDWR - Does both reading and writing
PSP_O_NBLOCK - Not quite sure what this is, but you dont have to worry about it
PSP_O_DIROPEN - This is an internal directory flag dont worry about it
PSP_O_APPEND - Opens the file and goes to the end of the file
PSP_O_CREAT - Creates the file if it doesnt exists (so if file not exist then it makes it Very Happy)
PSP_O_TRUNC - Truncates the file when opened
PSP_O_EXCL - Awaiting Name... (LOL)
PSP_O_NOWAIT - im not sure about this but supposing its maybe not waiting for something?

_________________
Experienced in C/OSLIB/C++/C#/HTML/PHP/HTML5/Javascript/Graphics and more...
PSP 1000 x1 Running 5.00M33-6
PSP Go x1 Running HBL Rev 101 V6.20
Team Unknown Leader

My Master Star aka NightStar3 [You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
Back to top Go down
 
[Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial]
Back to top 
Page 1 of 1
 Similar topics
-
» Curl Tutorial!
» AOE_Fan's RMS Command Tutorial
» Tutorials - How to add multiple ranks Forumotion
» Tutorials - Notice using css and table Forumotion
» i need help ;/

Permissions in this forum:You cannot reply to topics in this forum
PSP Pro GamerZ :: PSP :: C++ Tutorials/OSLIB/MIPS/Programming-
Jump to: