View Single Post
Re: I'm STEAMed up !!!
Old
  (#16)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: I'm STEAMed up !!! - 03-01-2004

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.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote