173 lines
5.0 KiB
HTML
173 lines
5.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title><ftw.h></title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="<ftw.h>"></a> <a name="tag_13_16"></a><!-- <ftw.h> -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_13_16_01"></a>NAME</h4>
|
|
|
|
<blockquote>ftw.h - file tree traversal</blockquote>
|
|
|
|
<h4><a name="tag_13_16_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> #include <ftw.h> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></div>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_16_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i><ftw.h></i> header shall define the <b>FTW</b> structure that includes at least the following members:</p>
|
|
|
|
<pre>
|
|
<tt>int base
|
|
int level
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>The <i><ftw.h></i> header shall define macros for use as values of the third argument to the application-supplied function
|
|
that is passed as the second argument to <a href="../functions/ftw.html"><i>ftw</i>()</a> and <a href=
|
|
"../functions/nftw.html"><i>nftw</i>()</a>:</p>
|
|
|
|
<dl compact>
|
|
<dt>FTW_F</dt>
|
|
|
|
<dd>File.</dd>
|
|
|
|
<dt>FTW_D</dt>
|
|
|
|
<dd>Directory.</dd>
|
|
|
|
<dt>FTW_DNR</dt>
|
|
|
|
<dd>Directory without read permission.</dd>
|
|
|
|
<dt>FTW_DP</dt>
|
|
|
|
<dd>Directory with subdirectories visited.</dd>
|
|
|
|
<dt>FTW_NS</dt>
|
|
|
|
<dd>Unknown type; <a href="../functions/stat.html"><i>stat</i>()</a> failed.</dd>
|
|
|
|
<dt>FTW_SL</dt>
|
|
|
|
<dd>Symbolic link.</dd>
|
|
|
|
<dt>FTW_SLN</dt>
|
|
|
|
<dd>Symbolic link that names a nonexistent file.</dd>
|
|
</dl>
|
|
|
|
<p>The <i><ftw.h></i> header shall define macros for use as values of the fourth argument to <a href=
|
|
"../functions/nftw.html"><i>nftw</i>()</a>:</p>
|
|
|
|
<dl compact>
|
|
<dt>FTW_PHYS</dt>
|
|
|
|
<dd>Physical walk, does not follow symbolic links. Otherwise, <a href="../functions/nftw.html"><i>nftw</i>()</a> follows links but
|
|
does not walk down any path that crosses itself.</dd>
|
|
|
|
<dt>FTW_MOUNT</dt>
|
|
|
|
<dd>The walk does not cross a mount point.</dd>
|
|
|
|
<dt>FTW_DEPTH</dt>
|
|
|
|
<dd>All subdirectories are visited before the directory itself.</dd>
|
|
|
|
<dt>FTW_CHDIR</dt>
|
|
|
|
<dd>The walk changes to each directory before reading it.</dd>
|
|
</dl>
|
|
|
|
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
|
|
|
|
<pre>
|
|
<tt>int ftw(const char *, int (*)(const char *, const struct stat *,
|
|
int), int);
|
|
int nftw(const char *, int (*)(const char *, const struct stat *,
|
|
int, struct FTW*), int, int);
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>The <i><ftw.h></i> header shall define the <b>stat</b> structure and the symbolic names for <i>st_mode</i> and the file
|
|
type test macros as described in <a href="sys/stat.h.html"><i><sys/stat.h></i></a> .</p>
|
|
|
|
<p>Inclusion of the <i><ftw.h></i> header may also make visible all symbols from <a href=
|
|
"../basedefs/sys/stat.h.html"><i><sys/stat.h></i></a>.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_13_16_04"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_16_05"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_16_06"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_16_07"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="sys/stat.h.html"><i><sys/stat.h></i></a> , the System Interfaces volume of IEEE Std 1003.1-2001, <a
|
|
href="../functions/ftw.html"><i>ftw</i>()</a>, <a href="../functions/nftw.html"><i>nftw</i>()</a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_16_08"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 1. Derived from Issue 1 of the SVID.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_16_09"></a>Issue 5</h4>
|
|
|
|
<blockquote>
|
|
<p>A description of FTW_DP is added.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|