1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/ftw.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,73 @@
1.4 +/* $OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp $ */
1.5 +
1.6 +/*
1.7 + * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
1.8 + * © Portions copyright (c) 2007 Symbian Software Ltd. All rights reserved.
1.9 + *
1.10 + * Permission to use, copy, modify, and distribute this software for any
1.11 + * purpose with or without fee is hereby granted, provided that the above
1.12 + * copyright notice and this permission notice appear in all copies.
1.13 + *
1.14 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1.15 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1.16 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1.17 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1.18 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1.19 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1.20 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.21 + *
1.22 + * Sponsored in part by the Defense Advanced Research Projects
1.23 + * Agency (DARPA) and Air Force Research Laboratory, Air Force
1.24 + * Materiel Command, USAF, under agreement number F39502-99-1-0512.
1.25 + *
1.26 + * $FreeBSD: src/include/ftw.h,v 1.2 2004/08/24 13:00:54 tjr Exp $
1.27 + */
1.28 +
1.29 +#ifndef _FTW_H
1.30 +#define _FTW_H
1.31 +
1.32 +#ifdef __cplusplus
1.33 +extern "C" {
1.34 +#endif
1.35 +#include <sys/types.h>
1.36 +#include <sys/stat.h>
1.37 +
1.38 +/*
1.39 + * Valid flags for the 3rd argument to the function that is passed as the
1.40 + * second argument to ftw(3) and nftw(3). Say it three times fast!
1.41 + */
1.42 +#define FTW_F 0 /* File. */
1.43 +#define FTW_D 1 /* Directory. */
1.44 +#define FTW_DNR 2 /* Directory without read permission. */
1.45 +#define FTW_DP 3 /* Directory with subdirectories visited. */
1.46 +#define FTW_NS 4 /* Unknown type; stat() failed. */
1.47 +#define FTW_SL 5 /* Symbolic link. */
1.48 +#define FTW_SLN 6 /* Sym link that names a nonexistent file. */
1.49 +
1.50 +/*
1.51 + * Flags for use as the 4th argument to nftw(3). These may be ORed together.
1.52 + */
1.53 +#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */
1.54 +#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */
1.55 +#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */
1.56 +#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */
1.57 +
1.58 +struct FTW {
1.59 + int base;
1.60 + int level;
1.61 +};
1.62 +
1.63 +__BEGIN_DECLS
1.64 +
1.65 +IMPORT_C int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
1.66 +
1.67 +#ifndef __SYMBIAN32__
1.68 +IMPORT_C int nftw(const char *, int (*)(const char *, const struct stat *, int,
1.69 + struct FTW *), int, int);
1.70 +#endif
1.71 +__END_DECLS
1.72 +
1.73 +#ifdef __cplusplus
1.74 +}
1.75 +#endif
1.76 +#endif /* !_FTW_H */