Lines Matching refs:path
24 bool CreateDirectory(const std::string &path) in CreateDirectory() argument
29 index = path.find('/', index + 1); in CreateDirectory()
31 subPath = path; in CreateDirectory()
33 subPath = path.substr(0, index); in CreateDirectory()
43 return access(path.c_str(), F_OK) == 0; in CreateDirectory()
46 bool RemoveDirectory(const std::string &path) in RemoveDirectory() argument
54 if (access(path.c_str(), F_OK) != 0) { in RemoveDirectory()
57 int statRet = stat(path.c_str(), &dirStat); in RemoveDirectory()
63 remove(path.c_str()); in RemoveDirectory()
65 dirp = opendir(path.c_str()); in RemoveDirectory()
70 std::string dirName = path + "/" + std::string(dp->d_name); in RemoveDirectory()
74 rmdir(path.c_str()); in RemoveDirectory()
81 std::string GetDirectory(const std::string &path) in GetDirectory() argument
84 size_t index = path.rfind('/'); in GetDirectory()
86 dir = path.substr(0, index); in GetDirectory()
91 bool CreateFile(const std::string &path) in CreateFile() argument
93 std::string dir = GetDirectory(path); in CreateFile()
100 if (access(path.c_str(), F_OK) != 0) { in CreateFile()
101 FILE *fp = fopen(path.c_str(), "w"); in CreateFile()
108 return access(path.c_str(), F_OK) == 0; in CreateFile()