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 

Verify if a file already exist ?

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



Joined: 29 May 2005
Posts: 214

PostPosted: Tue Aug 29, 2006 1:32 am    Post subject: Verify if a file already exist ? Reply with quote

Hello here, for the shell i'm working on i would like to search if a file exist or not in a directory. For this i can use a code like sceIopen to see what it return. But i'm sure there is a faster way to look if a file exist. I'm not really skilled so help would be cool hehe :x
Thanks in advance .
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Aug 29, 2006 3:44 am    Post subject: Reply with quote

Code:
if(access("blah.txt",F_OK)) file_exists();
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Wed Aug 30, 2006 6:28 am    Post subject: Reply with quote

Many thanks it work faster than the old method hehe. I had to put the unistd.h include and thats ok.
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