find out if a file already exists in 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
}