您当前的位置: 首页 >  phymat.nico windows

windows c++获取文件信息——_stat函数的使用

phymat.nico 发布时间:2020-10-30 12:25:18 ,浏览量:4

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

关注
打赏
查看更多评论

phymat.nico

暂无认证

  • 4浏览

    0关注

    1946博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录