博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年1月6日

摘要: 一、获取文件大小1、使用stat函数获取文件大小先看看struct结构吧,其中文件大小定义如下:#ifndef __USE_FILE_OFFSET64 __off_t st_size;/* Size of file, in bytes. */#else __off64_t st_size;/* Size of file, in bytes. */#endif一般我们使用的都是__off_t,也就是long int(4个字节,-2147438648~+2141438647),而__off64_t则是long long int(8个字节,-9223372036854775808~+92233720 阅读全文

posted @ 2013-01-06 10:37 开源云 阅读(1759) 评论(0) 推荐(0) 编辑