Lines Matching refs:path
39 static void access_ok(const char *path) { in access_ok() argument
40 if (access(path, F_OK) == -1) { in access_ok()
101 int makeFolder(const char *path) { in makeFolder() argument
103 int ret = mkdir((const char *)path, DIR_PERM); in makeFolder()
106 PLOG(ERROR) << "Failed to create folder " << path; in makeFolder()
109 chown((const char *)path, getuid(), FILE_GROUP); in makeFolder()
111 access_ok(path); in makeFolder()
197 void deleteRecursive(const char* path) { in deleteRecursive() argument
198 string pathStr(path); in deleteRecursive()
203 DIR* dir = opendir(path); in deleteRecursive()
205 PLOG(ERROR) << "opendir " << path << " failed"; in deleteRecursive()
232 bool deletePath(const char* path) { in deletePath() argument
235 if (stat(path, &statbuf) == 0) { in deletePath()
239 deleteRecursive(path); in deletePath()
240 success = rmdir(path); in deletePath()
242 success = unlink(path); in deletePath()
245 PLOG(ERROR) << "deletePath stat failed for " << path; in deletePath()
249 PLOG(ERROR) << "Deleting path " << path << " failed"; in deletePath()
250 access_ok(path); in deletePath()
263 void closeObjFd(int fd, const char *path) { in closeObjFd() argument
265 access_ok(path); in closeObjFd()