int canCreateFile(char* path) { FILE* file = fopen(path, "w"); if(file) { fclose(file); return 1; } return 0; }