summaryrefslogtreecommitdiff
path: root/build/myftw.h
blob: 074f3edae45541370b6bdb081cbe356be8b24eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _H_MYFTW_
#define _H_MYFTW_

/** \ingroup rpmbuild
 * \file build/myftw.h
 * Portable ftw(3) using lstat() instead of stat().
 */

#include <sys/stat.h>

/* The FLAG argument to the user function passed to ftw.  */
#define MYFTW_F		0		/* Regular file.  */
#define MYFTW_D		1		/* Directory.  */
#define MYFTW_DNR	2		/* Unreadable directory.  */
#define MYFTW_NS	3		/* Unstatable file.  */

#ifdef __cplusplus
extern "C" {
#endif

typedef int (*myftwFunc) (void *fl, const char *name, struct stat *statp)
	/*@*/;

int myftw (const char *dir, int descriptors, myftwFunc func, void *fl)
	/*@modifies *fl, fileSystem @*/;

#ifdef __cplusplus
}
#endif

#endif /* _H_MYFTW_ */