diff options
Diffstat (limited to 'src/ftw/__ftw.c')
-rw-r--r-- | src/ftw/__ftw.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ftw/__ftw.c b/src/ftw/__ftw.c new file mode 100644 index 00000000..2acee0cb --- /dev/null +++ b/src/ftw/__ftw.c @@ -0,0 +1,12 @@ +#include "_ftw.h" + +int __ftw(const char *path, int (*fn)(), int fd_limit, int flags) +{ + struct FTW ft; + struct stat st; + int type = 0; + + int ret = (flags == __FTW_OLD) ? fn(path, &st, type) : fn(path, &st, type, &ft); + + return ret; +} |