用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 永遇樂 閱讀(1772) 評論(0) 編輯 收藏 引用 所屬分類: 其它