Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ file exists

/*-------------------------------------------------------------------
    Returns a boolean indicating whether a file exists 
-------------------------------------------------------------------*/
bool FileExists(string Filepath)
{
   struct stat buffer;
   return (stat (Filepath.c_str(), &buffer) == 0);
}
 
PREVIOUS NEXT
Tagged: #file #exists
ADD COMMENT
Topic
Name
6+3 =