struct _stat64 state;
int res = _stat64("420.yuv", &state); //file size more than 2G if (res < 0) { switch (errno) { case ENOENT: printf("File %s not found.\n", "420.yuv"); break; case EINVAL: printf("Invalid parameter to _stat.\n"); break; default: /* Should never be reached. */ printf("Unexpected error in _stat.\n"); }
fprintf(stderr, "Faile to stat %s/n", res); return -1; }
https://www.cnblogs.com/matthew-2013/p/4679406.html