[c code] 檢查某檔案是否存在 – check file exists using C

FILE* fp = fopen(path, "r");
if (fp) {
    // file exists
    fclose(fp);
} else {
    // file doesn't exist
}