[comp.sources.wanted] WANTED: ftw - walk a file tree

kevin@pacific (Kevin Ingersent) (12/03/90)

I would like to get the source to the standard library function ftw(3),
which recursively descends a directory hierarchy, passing the name of
each file encountered to a user-supplied function.

Does anyone know whether this source (or any equivalent) is in the
public domain, and if so, where it can be found?

Thanks!

    Kevin
Kevin Ingersent  (kevin@pacific.mps.ohio-state.edu  or  jki@ohstpy.bitnet)

jeff@onion.pdx.com (Jeff Beadles) (12/03/90)

In <2395@pacific.mps.ohio-state.edu> kevin@pacific.mps.ohio-state.edu 
  (Kevin Ingersent) writes:
>I would like to get the source to the standard library function ftw(3),
>which recursively descends a directory hierarchy, passing the name of
>each file encountered to a user-supplied function.


Take a look in alt.sources.  I've just posted a version there that I received
when I asked the same question about a year ago...

	-Jeff
-- 
Jeff Beadles		jeff@onion.pdx.com

gisle@ifi.uio.no (Gisle Hannemyr) (12/03/90)

In article <2395@pacific.mps.ohio-state.edu> kevin@pacific (Kevin Ingersent) writes:

>  I would like to get the source to the standard library function ftw(3),
>  which recursively descends a directory hierarchy, passing the name of
>  each file encountered to a user-supplied function.
Look up K&R (first ed.)  Section 8.6 on page 169 - 173: ("Example -- Listing
Directories") contains source code for a program that recursively traverses
the directory hierarchy.  It tells you all you need to know to write your
own ftw(3).
--
Disclaimer: The opinions expressed herein are not necessarily those of my
            employer, not necessarily mine, and probably not necessary.
 
- gisle hannemyr  (Norwegian Computing Center)
  EAN:   C=no;PRMD=uninett;O=nr;S=Hannemyr;G=Gisle (X.400 SA format)
         gisle.hannemyr@nr.no                      (RFC-822  format)
  Inet:  gisle@ifi.uio.no
  UUCP:  ...!mcsun!ifi!gisle
------------------------------------------------