summaryrefslogtreecommitdiff
path: root/src/ftw/__ftw.c
blob: 2acee0cb683c4aa1281926ccd6577a9ff1808a80 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}