08-29-2005
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
fopen will return a NULL.
stat() also works. The advantage of stat() is that you get information about how you are allowed to open the file - ie., do you have access?. stat will not return an error if you have execute access to the directory, but no read access to the file. fopen will return an error.