1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/ftw.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,80 @@
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 +
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 +/* Portions Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/
1.30 +
1.31 +#ifndef _FTW_H
1.32 +#define _FTW_H
1.33 +
1.34 +#ifdef __cplusplus
1.35 +extern "C" {
1.36 +#endif
1.37 +#include <sys/types.h>
1.38 +#include <sys/stat.h>
1.39 +
1.40 +/*
1.41 + * Valid flags for the 3rd argument to the function that is passed as the
1.42 + * second argument to ftw(3) and nftw(3). Say it three times fast!
1.43 + */
1.44 +#define FTW_F 0 /* File. */
1.45 +#define FTW_D 1 /* Directory. */
1.46 +#define FTW_DNR 2 /* Directory without read permission. */
1.47 +#define FTW_DP 3 /* Directory with subdirectories visited. */
1.48 +#define FTW_NS 4 /* Unknown type; stat() failed. */
1.49 +#define FTW_SL 5 /* Symbolic link. */
1.50 +#define FTW_SLN 6 /* Sym link that names a nonexistent file. */
1.51 +
1.52 +/*
1.53 + * Flags for use as the 4th argument to nftw(3). These may be ORed together.
1.54 + */
1.55 +#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */
1.56 +#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */
1.57 +#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */
1.58 +#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */
1.59 +
1.60 +struct FTW {
1.61 + int base;
1.62 + int level;
1.63 +};
1.64 +
1.65 +__BEGIN_DECLS
1.66 +
1.67 +IMPORT_C int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
1.68 +
1.69 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
1.70 +#define ftw64 ftw
1.71 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
1.72 +
1.73 +
1.74 +#ifndef __SYMBIAN32__
1.75 +IMPORT_C int nftw(const char *, int (*)(const char *, const struct stat *, int,
1.76 + struct FTW *), int, int);
1.77 +#endif
1.78 +__END_DECLS
1.79 +
1.80 +#ifdef __cplusplus
1.81 +}
1.82 +#endif
1.83 +#endif /* !_FTW_H */