用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 永遇乐 阅读(1729) 评论(0)  编辑 收藏 引用 所属分类: 其它


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


<2008年7月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

导航

统计

常用链接

留言簿(6)

随笔分类

推荐Blog

友情链接

搜索

最新评论

阅读排行榜