#include<sys/stat.h>
#include<fstream>
#include<string>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
#include<io.h>
#include<iostream>
bool IsFileGood(string strFileName, book bFile)
{
? ? if(bFile) \\文件
? ? {
? ? ? ? ifstream Ifn(strFileName.c_str());
? ? ? ? bool bRet = Ifn.good();
? ? ? ? Ifn.close();
? ? ? ? return bRet;
? ? }
? ? else? \\目錄
? ? {
? ? ? ? return (access(strFileName.c_str(), 0) != -1)
? ? }
}
?
?