BOOL HDTLog4Cplus::IsLogFileEmpty ()
{
FILE* fp = NULL ;
if((fp = fopen (m_filename.c_str(), "rb")) == NULL )
{
return FALSE ;
}
fseek (fp, 0, SEEK_END) ;
int lenth = ftell (fp) ;
if (0 == lenth)
{
fclose (fp) ;
return TRUE ;
}
else if (-1 == lenth)
{
throw runtime_error ("参数输入错") ;
}
else
{
fclose (fp) ;
return FALSE ;
}
}