Chinaunix首页 | 论坛 | 博客
  • 博客访问: 642452
  • 博文数量: 78
  • 博客积分: 4990
  • 博客等级: 上校
  • 技术积分: 1386
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-13 19:25
文章分类

全部博文(78)

文章存档

2010年(6)

2009年(25)

2008年(47)

我的朋友

分类: C/C++

2008-10-28 15:26:36

#include
#include
#include
#include
#include
 
int getFileSize(char* fileName)
{
  int fd;
  struct stat stat;
 
  if(fd = open(fileName, O_RDONLY) < 0)
  {
    printf("Open file ERROR\n");
    return(FALSE);
  }
 
  return((fstat(fd,&stat) < 0) ? FALSE : stat.st_size);
}
阅读(1746) | 评论(0) | 转发(0) |
0

上一篇:函数文档

下一篇:sqlite在ubuntu上的安装

给主人留下些什么吧!~~