fts.h revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Copyright (c) 1985-2007 AT&T Knowledge Ventures *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* by AT&T Knowledge Ventures *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Glenn Fowler <gsf@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Phong Vo <kpv@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Glenn Fowler
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * David Korn
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Phong Vo
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * AT&T Research
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fts interface definitions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fts_open flags
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_LOGICAL 0 /* logical traversal, follow symlinks */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_META (1<<0) /* follow top dir symlinks even if phys */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_NOPOSTORDER (1<<2) /* no postorder visits */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_NOSEEDOTDIR (1<<11) /* never retain leading . dir */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_ONEPATH (1<<5) /* pathnames arg is one const char* */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_PHYSICAL (1<<6) /* physical traversal, don't follow */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_SEEDOTDIR (1<<10) /* always retain leading . dir */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_TOP (1<<8) /* don't traverse subdirectories */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fts_info flags
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_DEFAULT 0 /* ok, someone must have wanted this */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_F (1<<1) /* file - not directory or symbolic link*/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_DC (FTS_D|FTS_C) /* dir - would cause cycle */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_DNR (FTS_D|FTS_NR) /* dir - no read permission */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_DNX (FTS_D|FTS_NX) /* dir - no search permission */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_DP (FTS_D|FTS_P) /* dir - post-order visit */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_NSOK (FTS_NS|FTS_OK) /* no stat (because you asked) */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define FTS_SLNONE (FTS_SL|FTS_NS) /* symlink - to nowhere */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fts_set flags
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define extern __EXPORT__
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int fts_flags(void);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int fts_notify(int(*)(FTS*, FTSENT*, void*), void*);