Lines Matching defs:dir
199 DIR *dir;
202 dir = opendir(dir_path);
203 if (dir == NULL)
208 while ((dir_ent = readdir(dir)) != NULL) {
215 rewinddir(dir);
226 dir_ent = readdir(dir);
231 if (fstatat(dirfd(dir), dir_ent->d_name, &sb, 0) == 0) {
283 closedir(dir);
298 closedir(dir);
342 * special name of ".."). We also return false if the dir is empty.
360 DIR *dir = opendir(subdir);
363 if (dir == NULL)
368 while ((d = readdir(dir)) != NULL) {
372 closedir(dir);
374 /* If dir only contains '.' and '..' it must be empty */
389 char *dir;
393 if (asprintf(&dir, "%s/%c%c", cache->path, buf[0], buf[1]) == -1)
396 mkdir_if_needed(dir);
397 free(dir);