[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: findfirst(), etc.
Hi Felix,
> I want to search for files:
>
> _filedata_t foo;
> bool ind= findfirst (foo, "*.*");
> findnext (ind, foo);
> findclose (foo);
>
> Perhaps, these functions are not 100%ly right. But I hope this make
> clear what I mean.
Generally, using opendir(), readdir(), and closedir() should do the
trick on any POSIX system.
You'll have to filter out filenames that don't contain a '.' manually,
though.
Alternatively, you could use the BSD scandir() function- but it's likely
that some unices won't support it.
A general hint: If you want to do something and don't know how to do it,
try "apropos <topic>". This will often point you to man pages dealing with
this (or a related) topic.
llap,
Christoph