File indexing completed on 2025-04-19 09:09:54
0001 #ifndef ATOOLS_Org_Shell_Tools_H
0002 #define ATOOLS_Org_Shell_Tools_H
0003
0004 #include <string>
0005 #include <vector>
0006 #include <sys/types.h>
0007 #include <unistd.h>
0008
0009 namespace ATOOLS {
0010
0011 bool MakeDir(std::string path,const bool create_tree=0,
0012 const mode_t mode=0777);
0013 bool ChMod(const std::string &file,const mode_t mode=0777);
0014 bool Copy(const std::string &oldname,const std::string &newname,
0015 const bool recursive=false);
0016 bool Move(const std::string &oldname,const std::string &newname);
0017 bool Remove(const std::string &file,const bool recursive=false);
0018
0019 std::vector<std::string> EnvironmentVariable(const std::string &name,
0020 std::string entry="");
0021
0022 bool FileExists(const std::string &file,const int mode=0);
0023 bool DirectoryExists(const std::string &dir);
0024
0025 std::string Demangle(const std::string &name);
0026
0027 std::string GetCWD();
0028
0029 std::vector<std::string> RegExMatch
0030 (const std::string &str,const std::string &pat,const size_t nm=1);
0031
0032 std::string ShortenPathName(std::string path);
0033
0034 }
0035
0036 #endif