int File_Exist(char *file)
{
FILE *fp;
fp=fopen(file,"r");
if(fp==NULL)
return 0; // not exist
else
{
fclose(fp);
return 1; //exist
}
}
//
#if 1
//判断存在 数据文件--存在则删除
if ( File_Exist("snapshot.jpg")==1)
{
remove("snapshot.jpg");
printf("Bin File Exist and Deleted!");
}
#endif