Linux 获取文件大小--C函数
来源:互联网 发布:域普软件 编辑:程序博客网 时间:2024/05/17 23:53
#include <sys/stat.h>
unsigned long get_file_size(const char *path)
{
unsigned long filesize = -1;
struct stat statbuff;
if(stat(path, &statbuff) < 0){
return filesize;
}else{
filesize = statbuff.st_size;
}
return filesize;
}
unsigned long get_file_size(const char *path)
{
unsigned long filesize = -1;
struct stat statbuff;
if(stat(path, &statbuff) < 0){
return filesize;
}else{
filesize = statbuff.st_size;
}
return filesize;
}
阅读全文
1 0
- Linux 获取文件大小--C函数
- Linux 获取文件大小--C函数
- Linux 获取文件大小--C函数
- linux获取文件大小[c]
- LINUX C获取文件大小
- LINUX C获取文件大小
- LINUX C获取文件大小
- linux c获取文件大小
- linux c 获取文件大小
- linux获取文件大小的函数
- linux c 下获取文件大小
- linux c 下获取文件大小
- linux c下获取文件大小
- 转--C函数获取文件大小【待用】
- C语言中获取文件大小的函数
- Linux下获取文件大小,检索目录函数
- Linux下获取文件大小,检索目录函数
- linux 使用lseek函数来获取文件大小
- Springboot基础篇 之细节处理(在持续更新中。。。。)
- 虚拟现实的艺术特点
- D
- jquery 获取第一个元素的方法
- hpuoj【1319】小写换大写【字符串】
- Linux 获取文件大小--C函数
- sqlzoo练习答案--Self join
- 算法导论 单源最短路径 DAG-SHORTEST-PATHS
- build.gradle 名字生成网址
- android的makefile -- Android.mk
- A + B 问题(不能用+等数学运算符。)
- SpringCloud 之第二篇: 服务消费者(rest+ribbon)
- 深入了解Java虚拟机学习之--如何实现线程安全?
- tensorflow——SVM实现