gpt4 book ai didi

c - 在C程序中查找目录

转载 作者:行者123 更新时间:2023-11-30 19:22:21 25 4
gpt4 key购买 nike

C程序中如何判断某个目录是否存在?我知道 getcwd() 为您提供当前目录,但我想找到任何目录。有没有这样的功能或者我该怎么做?我正在使用Ubuntu

最佳答案

opendirreaddirclosedir 是 POSIX 函数,因此它们应该在 Linux、MacOS、Windows 以及任何 Unix 类型中可用系统。

关于c - 在C程序中查找目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16686906/

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