Lines Matching refs:pathname
539 int create_dir_if_needed(const std::string& pathname, mode_t perms) { in create_dir_if_needed() argument
543 if ((rc = stat(pathname.c_str(), &st)) != 0) { in create_dir_if_needed()
545 return mkdir(pathname.c_str(), perms); in create_dir_if_needed()
550 LOG(DEBUG) << pathname << " is not a folder"; in create_dir_if_needed()
556 LOG(WARNING) << pathname << " permissions " << actual_perms << " expected " << perms; in create_dir_if_needed()
563 int delete_dir_contents(const std::string& pathname, bool ignore_if_missing) { in delete_dir_contents() argument
564 return delete_dir_contents(pathname.c_str(), 0, nullptr, ignore_if_missing); in delete_dir_contents()
567 int delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing) { in delete_dir_contents_and_dir() argument
568 return delete_dir_contents(pathname.c_str(), 1, nullptr, ignore_if_missing); in delete_dir_contents_and_dir()
571 int delete_dir_contents(const char *pathname, in delete_dir_contents() argument
579 d = opendir(pathname); in delete_dir_contents()
584 ALOGE("Couldn't opendir %s: %s\n", pathname, strerror(errno)); in delete_dir_contents()
590 if (rmdir(pathname)) { in delete_dir_contents()
591 ALOGE("Couldn't rmdir %s: %s\n", pathname, strerror(errno)); in delete_dir_contents()