std::string folderPath = "c:"+ "\\log";
     std::string command;
     command = "mkdir -p " + folderPath;
//     system(command.c_str());
     if (0 != access(folderPath.c_str(), 0))
     {
           // if this folder not exist, create a new one.
           mkdir(folderPath.c_str());   // 返回 0 表示创建成功,-1 表示失败
//           qDebug() << folderPath.c_str();
      }

 

相关文章:

  • 2021-05-27
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-01-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-15
  • 2021-10-23
  • 2021-12-13
相关资源
相似解决方案