1 /*
2  * BEGIN illumos section
3  *   This is an unstable interface; changes may be made
4  *   without notice.
5  * END illumos section
6  */
7 /***********************************************************************
8 *                                                                      *
9 *               This software is part of the ast package               *
10 *          Copyright (c) 1985-2011 AT&T Intellectual Property          *
11 *                      and is licensed under the                       *
12 *                 Eclipse Public License, Version 1.0                  *
13 *                    by AT&T Intellectual Property                     *
14 *                                                                      *
15 *                A copy of the License is available at                 *
16 *          http://www.eclipse.org/org/documents/epl-v10.html           *
17 *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
18 *                                                                      *
19 *              Information and Software Systems Research               *
20 *                            AT&T Research                             *
21 *                           Florham Park NJ                            *
22 *                                                                      *
23 *                 Glenn Fowler <gsf@research.att.com>                  *
24 *                  David Korn <dgk@research.att.com>                   *
25 *                   Phong Vo <kpv@research.att.com>                    *
26 *                                                                      *
27 ***********************************************************************/
28 #pragma prototyped
29 /*
30  * ftw,nftw over ftwalk
31  */
32 
33 #ifndef _FTW_H
34 #define _FTW_H
35 
36 #define FTW		FTWALK
37 #include <ftwalk.h>
38 #undef			FTW
39 
40 #define FTW_SLN		(FTW_SL|FTW_NR)
41 
42 #define FTW_PHYS	(FTW_PHYSICAL)
43 #define FTW_CHDIR	(FTW_DOT)
44 #define FTW_DEPTH	(FTW_POST)
45 #define FTW_OPEN	(0)
46 
47 struct FTW
48 {
49 	int		quit;
50 	int		base;
51 	int		level;
52 };
53 
54 #define FTW_SKD		FTW_SKIP
55 #define FTW_PRUNE	FTW_SKIP
56 
57 #if _BLD_ast && defined(__EXPORT__)
58 #define extern		__EXPORT__
59 #endif
60 
61 extern int	ftw(const char*, int(*)(const char*, const struct stat*, int), int);
62 extern int	nftw(const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int);
63 
64 #undef	extern
65 
66 #endif
67