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