You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DirOperation.cpp 454 B

123456789101112131415161718192021
  1. #include "DirOperation.h"
  2. #include <QDir>
  3. #include <QString>
  4. bool DirOperation::CreateDir(std::string path)
  5. {
  6. if (path == "")
  7. return false;
  8. return QDir().mkpath(path.c_str());
  9. }
  10. std::string DirOperation::GetExePath()
  11. {
  12. return QDir::currentPath().toStdString();
  13. }
  14. std::string DirOperation::ConcatePath(std::string path1, std::string path2)
  15. {
  16. return QDir::cleanPath(QDir(path1.c_str()).filePath(path2.c_str())).toStdString();
  17. }