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()
196 void deleteRecursive(const char* path) { in deleteRecursive() argument
197 string pathStr(path); in deleteRecursive()
202 DIR* dir = opendir(path); in deleteRecursive()
204 PLOG(ERROR) << "opendir " << path << " failed"; in deleteRecursive()
231 bool deletePath(const char* path) { in deletePath() argument
234 if (stat(path, &statbuf) == 0) { in deletePath()
238 deleteRecursive(path); in deletePath()
239 success = rmdir(path); in deletePath()
241 success = unlink(path); in deletePath()
244 PLOG(ERROR) << "deletePath stat failed for " << path; in deletePath()
248 PLOG(ERROR) << "Deleting path " << path << " failed"; in deletePath()
249 access_ok(path); in deletePath()
262 void closeObjFd(int fd, const char *path) { in closeObjFd() argument
264 access_ok(path); in closeObjFd()