gpt4 book ai didi

c - 是否有 stat() 的宽字符版本(来自 sys/stat.h)?

转载 作者:太空宇宙 更新时间:2023-11-04 06:44:45 29 4
gpt4 key购买 nike

我一直在使用 stat() 检查文件是否存在,据我所知,这比尝试打开文件更好。但是,stat() 不适用于包含其他语言的 unicode 字符的文件名。是否有 stat() 的宽字符版本或我可以使用的等效版本?

如果不是,检查文件是否存在的下一个可接受的解决方案是什么?

最佳答案

在 Windows 中,您可以使用宽字符版本:_wstat

关于c - 是否有 stat() 的宽字符版本(来自 sys/stat.h)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2047271/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com