Horje
c check if file exists Code Example
c check if file exists
if( access( fname, F_OK ) == 0 ) {
    // file exists
} else {
    // file doesn't exist
}
c check if file was created
int canCreateFile(char* path)
{
	FILE* file = fopen(path, "w");
  	if(file)
    {
  		fclose(file);
      	return 1;
    }
  	return 0;
}




C

Related
c remove last character from a string Code Example c remove last character from a string Code Example
invalid operands to binary expression ('int *' and 'int *') Code Example invalid operands to binary expression ('int *' and 'int *') Code Example
initialize array c Code Example initialize array c Code Example
designated initialization Code Example designated initialization Code Example
array intialization Code Example array intialization Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
18