check is file exist linux api c code example
Example: c check if file was created
int canCreateFile(char* path)
{
FILE* file = fopen(path, "w");
if(file)
{
fclose(file);
return 1;
}
return 0;
}
int canCreateFile(char* path)
{
FILE* file = fopen(path, "w");
if(file)
{
fclose(file);
return 1;
}
return 0;
}