Re: fts(3) depth or breadth first?
From: Valentin Nechayev (netch_at_segfault.kiev.ua)
Date: 06/04/03
- Next message: Valentin Nechayev: "Re: How to scan C files to find the required include files ?"
- Previous message: Valentin Nechayev: "Re: dseek()?"
- In reply to: William Ahern: "fts(3) depth or breadth first?"
- Next in thread: phil-news-nospam_at_ipal.net: "Re: fts(3) depth or breadth first?"
- Reply: phil-news-nospam_at_ipal.net: "Re: fts(3) depth or breadth first?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 4 Jun 2003 22:09:12 +0300
>>> William Ahern wrote:
WA> is there any way to control the depth that fts(3) goes to?
No. fts is only depth first (but in the same time depth last, i.e.
you can ask it to list directory both before and after its contents).
Breadth first order isn't implemented.
WA> if i only want to
WA> see 1 level deep, if i break out after the very first ftsent w/ a depth > 1
WA> will i miss any level 1 files?
Yes, you'll miss them.
As far as I understand its manpage, you can limit depth manually using
FTS_SKIP flag in fts_set() when program sees directory at maximal allowed
depth.
-netch-
- Next message: Valentin Nechayev: "Re: How to scan C files to find the required include files ?"
- Previous message: Valentin Nechayev: "Re: dseek()?"
- In reply to: William Ahern: "fts(3) depth or breadth first?"
- Next in thread: phil-news-nospam_at_ipal.net: "Re: fts(3) depth or breadth first?"
- Reply: phil-news-nospam_at_ipal.net: "Re: fts(3) depth or breadth first?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]