用C函数获取文件的长度

#include <io.h>

int GetFileSize(const char * pszFilePath)
{
   FILE *fp = fopen(pszFilePath,  "rb"); 
   VERIFY(fp != NULL);
    const int nFile = _fileno(fp);
    const int nFileLength = _filelength(nFile);
   fclose(fp)
    return nFileLength;
}

posted on 2006-10-20 10:32 永遇乐 阅读(1715) 评论(0)  编辑 收藏 引用 所属分类: 其它


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2006年10月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

导航

统计

常用链接

留言簿(6)

随笔分类

推荐Blog

友情链接

搜索

最新评论

阅读排行榜