Quote:
Originally Posted by Austin
A more orthodox way of testing if a file exists instead of trying to open it?
Sure:
#include <sys/stat.h>
struct _stat buf;
if( _stat( "valve/steam.inf", &buf ) == 0 )
{
//file exists
}
Totally,
Standard c lib stuff.
|
As for portability, I think _stat is Win32 only, while fopen is cross platform.