#ifndef CFTW_H #define CFTW_H #include #include enum cftw_state { CFTW_OK, CFTW_AGAIN, CFTW_FATAL }; /* Thread-safe and non-blocking variant of ftw(3) and nftw(3) that allows * passing an opaque pointer and removes some unneeded parameters. */ struct cftw *cftw(const char *dirpath, int (*fn)(const char *fpath, const struct stat *sb, bool *done, void *user), void *user); enum cftw_state cftw_step(struct cftw *c); void cftw_free(struct cftw *c); #endif /* CFTW_H */