Ethereal-dev: Re: [Ethereal-dev] Is there a portable way to loop through all the filenames in

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sat, 10 Sep 2005 13:25:17 +0200
LEGO wrote:

Is there a portable way to loop through all the filenames in a given directory?

I'l need to load each file in a given directory.

Is there a portable way to do it or sould I write two different
function bodies one for *nix and one for windows.

Luis

There is, just look at the file set handling (which I've copied from the plugin loading when I remember correct). See opendir/readdir/closedir used in fileset.c, as they're available from the GLib.

Regards, ULFL