Lines Matching defs:de
27 int dirent_ensure_type(DIR *d, struct dirent *de) {
31 assert(de);
33 if (de->d_type != DT_UNKNOWN)
36 if (fstatat(dirfd(d), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0)
39 de->d_type =
52 bool dirent_is_file(const struct dirent *de) {
53 assert(de);
55 if (hidden_file(de->d_name))
58 if (de->d_type != DT_REG &&
59 de->d_type != DT_LNK &&
60 de->d_type != DT_UNKNOWN)
66 bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) {
67 assert(de);
69 if (de->d_type != DT_REG &&
70 de->d_type != DT_LNK &&
71 de->d_type != DT_UNKNOWN)
74 if (hidden_file_allow_backup(de->d_name))
77 return endswith(de->d_name, suffix);