test the existence off a file C code example
Example: c check if file exists
if( access( fname, F_OK ) == 0 ) {
// file exists
} else {
// file doesn't exist
}
if( access( fname, F_OK ) == 0 ) {
// file exists
} else {
// file doesn't exist
}