Z
zou
there is a file which is very large,
we can use stat to get a file size(<2G),
struct stat buf;
stat("file", &buf);
long s=(long)stat.st_size;
but stat::st_size is type of off_t(typedef long),
so how about a file larger than 2G?
we can use stat to get a file size(<2G),
struct stat buf;
stat("file", &buf);
long s=(long)stat.st_size;
but stat::st_size is type of off_t(typedef long),
so how about a file larger than 2G?