PSP Pro GamerZ
Would you like to react to this message? Create an account in a few clicks or log in to continue.

PSP Pro GamerZ

For all your PSP Needs
AKA Team Unknown Forum
HomeRegisterLog 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 ----


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

Go down 

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

[Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial] Empty
PostSubject: [Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial]   [Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial] EmptyThu 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
#include <pspiofilemgr.h>

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

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.]
Back to top Go down
[Tutorial]C/C++ Tutorials Part 4 - I/O Functions [Tutorial]
Back to top 
Page 1 of 1
 Similar topics
» [Tutorial] C/C++ Tutorials Part 2 - Making a Hello world by KaZ [Tutorial]
» [Tutorial] C/C++ Tutorials Part 3 - CTRL Pad by KaZ[Tutorial]
» [Quick Tutorial]Part 1 - How to setup PSPDev/PSPSDK [Tutorial]
» [Tutorial] How to make a custom EBOOT.PBP (By Yitanfinalfantasy9)
» [Tutorial] Using sound effects in homebrew (OSlib)

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