📌  相关文章
📜  检查目录是否存在 cpp - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:58.810000             🧑  作者: Mango

代码示例2
#include 

int main() {
    struct stat buffer;
    std::string string = "Hello";
    
    if (stat(&string.c_str(), &buffer) != 0) {
        std::cout << "'Hello' directory doesn't exist!";
    } else {
        std::cout << "'Hello' directory exists!";
    }
}