Lines Matching refs:dir_path
368 choose_random_file_matching(const char *dir_path, in choose_random_file_matching() argument
370 const char *dir_path)) in choose_random_file_matching()
377 dir = opendir(dir_path); in choose_random_file_matching()
387 if (!predicate(entry, dir_path)) in choose_random_file_matching()
407 if (!predicate(entry, dir_path)) in choose_random_file_matching()
420 if (asprintf(&filename, "%s/%s", dir_path, entry->d_name) < 0) in choose_random_file_matching()
505 char *dir_path; in evict_random_item() local
516 if (asprintf(&dir_path, "%s/%c%c", cache->path, hex[a], hex[b]) < 0) in evict_random_item()
519 size = unlink_random_file_from_directory(dir_path); in evict_random_item()
521 free(dir_path); in evict_random_item()
535 dir_path = choose_random_file_matching(cache->path, in evict_random_item()
537 if (dir_path == NULL) in evict_random_item()
540 size = unlink_random_file_from_directory(dir_path); in evict_random_item()
542 free(dir_path); in evict_random_item()