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