linux_Small0318 fstat get length

来源:互联网 发布:淘宝网腰带 编辑:程序博客网 时间:2024/06/06 18:14

1 fstat

  Fstat gets the file length excluding the buffer length, you can use fseek or fwrite to make the fomer buffer in the file,and then use fstat to get the length again.

 Another solution is to use fseek first to set to the SEEK_END, and the use ftell to show the length.

2 stat.postion

 It will tell the postion inculding the buffer file.

  

原创粉丝点击