标签:linux c files 获取文件 file ons inux == linux name
#include <sys/stat.h>
int FileSize(const char* fname)
{
struct stat statbuf;
if(stat(fname,&statbuf)==0)
return statbuf.st_size;
return -1;
}
标签:linux c files 获取文件 file ons inux == linux name
原文地址:https://www.cnblogs.com/smallredness/p/10259237.html