#include <sys/stat.h> bool fileExists(const char *filename) { struct stat sb; return stat(filename, &sb) == 0; }
Programming Tips - C/C++: see if a file exists
Date: 2025apr7
Language: C/C++
OS: Linux
Q. C/C++: see if a file exists
A.