Lines Matching refs:pathname
542 int create_dir_if_needed(const std::string& pathname, mode_t perms) { in create_dir_if_needed() argument
546 if ((rc = stat(pathname.c_str(), &st)) != 0) { in create_dir_if_needed()
548 return mkdir(pathname.c_str(), perms); in create_dir_if_needed()
553 LOG(DEBUG) << pathname << " is not a folder"; in create_dir_if_needed()
559 LOG(WARNING) << pathname << " permissions " << actual_perms << " expected " << perms; in create_dir_if_needed()
566 int delete_dir_contents(const std::string& pathname, bool ignore_if_missing) { in delete_dir_contents() argument
567 return delete_dir_contents(pathname.c_str(), 0, nullptr, ignore_if_missing); in delete_dir_contents()
570 int delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing) { in delete_dir_contents_and_dir() argument
571 return delete_dir_contents(pathname.c_str(), 1, nullptr, ignore_if_missing); in delete_dir_contents_and_dir()
574 int delete_dir_contents(const char *pathname, in delete_dir_contents() argument
582 d = opendir(pathname); in delete_dir_contents()
587 ALOGE("Couldn't opendir %s: %s\n", pathname, strerror(errno)); in delete_dir_contents()
593 if (rmdir(pathname)) { in delete_dir_contents()
594 ALOGE("Couldn't rmdir %s: %s\n", pathname, strerror(errno)); in delete_dir_contents()