stat-util: Add dir_is_empty_at

This commit is contained in:
Ryan Gonzalez
2019-01-08 10:23:17 -06:00
parent a75211421f
commit d7c1a15edf
2 changed files with 16 additions and 4 deletions
+4 -1
View File
@@ -15,7 +15,10 @@ int is_dir(const char *path, bool follow);
int is_dir_fd(int fd);
int is_device_node(const char *path);
int dir_is_empty(const char *path);
int dir_is_empty_at(int dir_fd, const char *path);
static inline int dir_is_empty(const char *path) {
return dir_is_empty_at(AT_FDCWD, path);
}
static inline int dir_is_populated(const char *path) {
int r;