TLS calls (currently unused)
[reactos.git] / posix / include / ftw.h
1 /* $Id: ftw.h,v 1.2 2002/02/20 09:17:54 hyperion Exp $
2 */
3 /*
4 * ftw.h
5 *
6 * file tree traversal. Conforming to the Single UNIX(r) Specification
7 * Version 2, System Interface & Headers Issue 5
8 *
9 * This file is part of the ReactOS Operating System.
10 *
11 * Contributors:
12 * Created by KJK::Hyperion <noog@libero.it>
13 *
14 * THIS SOFTWARE IS NOT COPYRIGHTED
15 *
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
18 *
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 */
25 #ifndef __FTW_H_INCLUDED__
26 #define __FTW_H_INCLUDED__
27
28 /* INCLUDES */
29
30 /* OBJECTS */
31
32 /* TYPES */
33 struct FTW
34 {
35 int base;
36 int level;
37 };
38
39 /* CONSTANTS */
40 /* Values of the third argument to the application-supplied function
41 that is passed as the second argument to ftw() and nftw() */
42 #define FTW_F (1) /* File. */
43 #define FTW_D (2) /* Directory. */
44 #define FTW_DNR (3) /* Directory without read permission. */
45 #define FTW_DP (4) /* Directory with subdirectories visited. */
46 #define FTW_NS (5) /* Unknown type, stat() failed. */
47 #define FTW_SL (6) /* Symbolic link. */
48 #define FTW_SLN (7) /* Symbolic link that names a non-existent file. */
49
50 /* Values of the fourth argument to nftw() */
51 #define FTW_PHYS (0x00000001) /* Physical walk, does not follow symbolic \
52 links. Otherwise, nftw() will follow \
53 links but will not walk down any path \
54 that crosses itself. */
55 #define FTW_MOUNT (0x00000002) /* The walk will not cross a mount point. */
56 #define FTW_DEPTH (0x00000004) /* All subdirectories will be visited before \
57 the directory itself. */
58 #define FTW_CHDIR (0x00000008) /* The walk will change to each directory \
59 before reading it. */
60
61 /* PROTOTYPES */
62 int ftw(const char *,
63 int (*)(const char *, const struct stat *, int), int);
64 int nftw(const char *, int (*)
65 (const char *, const struct stat *, int, struct FTW*),
66 int, int);
67
68 /* MACROS */
69
70 #endif /* __FTW_H_INCLUDED__ */
71
72 /* EOF */
73