c Überprüfen Sie, ob die Datei vorliegt
if( access( fname, F_OK ) == 0 ) {
// file exists
} else {
// file doesn't exist
}
chfle
if( access( fname, F_OK ) == 0 ) {
// file exists
} else {
// file doesn't exist
}
int canCreateFile(char* path)
{
FILE* file = fopen(path, "w");
if(file)
{
fclose(file);
return 1;
}
return 0;
}