dirent-util: introduce readdir_ensure_type()

This commit is contained in:
Yu Watanabe
2021-06-24 04:19:38 +09:00
parent b905f3bbba
commit 98f7a4c8bb
2 changed files with 16 additions and 3 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ int dirent_ensure_type(DIR *d, struct dirent *de);
bool dirent_is_file(const struct dirent *de) _pure_;
bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) _pure_;
struct dirent* readdir_no_dot(DIR *dirp);
struct dirent *readdir_ensure_type(DIR *d);
struct dirent *readdir_no_dot(DIR *dirp);
#define FOREACH_DIRENT(de, d, on_error) \
for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d)) \