<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Just ignore “FTS_DP” fts_info in the loops. This ensures that the file tree is pre-order traversed.</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Yuxi Wang</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> cs631apue-bounces@lists.stevens.edu &lt;cs631apue-bounces@lists.stevens.edu&gt; on behalf of Devharsh Trivedi &lt;dtrived5@stevens.edu&gt;<br>
<b>Sent:</b> Tuesday, October 15, 2019 1:46:25 PM<br>
<b>To:</b> Zixuan Chen &lt;zchen91@stevens.edu&gt;<br>
<b>Cc:</b> cs631apue@lists.stevens.edu &lt;cs631apue@lists.stevens.edu&gt;<br>
<b>Subject:</b> Re: [cs631apue] FTS directories visited twice</font>
<div>&nbsp;</div>
</div>
<div>From manual:
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In general,</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp; directories are visited two distinguishable times; in pre-order (before</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp; any of their descendants are visited) and in post-order (after all of</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp; their descendants have been visited).&nbsp; Files are visited once.&nbsp; It is</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp; possible to walk the hierarchy &quot;logically&quot; (ignoring symbolic links) or</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp; physically (visiting symbolic links), order the walk of the hierarchy or</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp; prune and/or re-visit portions of the hierarchy.</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<br class="">
</div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
I have used fts_info attribute for printing once.</div>
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);" class="">
<br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Oct 8, 2019, at 6:45 PM, Zixuan Chen &lt;<a href="mailto:zchen91@stevens.edu" class="">zchen91@stevens.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hello Professor,<br class="">
I see that in the FTS description, directories will be visited twice, both in preorder and postorder. Could you tell me the purposes of doing that? And what can we do in order to avoid printing the name of upper directory twice when only listing the content
 of current working directory?<br class="">
Thanks.<br class="">
<br class="">
Best Regards,<br class="">
Zixuan Chen<br class="">
_______________________________________________<br class="">
cs631apue mailing list<br class="">
<a href="mailto:cs631apue@lists.stevens.edu" class="">cs631apue@lists.stevens.edu</a><br class="">
https://lists.stevens.edu/mailman/listinfo/cs631apue<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>