_findfirst in MicroSoft C
Hello :
In MicroSoft C/C++ , there are functions ( _findfirst, _findnext ... )
used to look for files with wildcard characters , but none of them
exist in Unix C/C++ .
example :
find all files named like "demo_*.*"
Are there similar functions exist in Unix C/C++ ? ( don't use system() function )
If not , how to implement them with simplest methods ?
Thanks !!
:confused: ----- jesvh
Re: _findfirst in MicroSoft C
Quote:
Originally posted by jesvh
Hello :
In MicroSoft C/C++ , there are functions ( _findfirst, _findnext ... )
used to look for files with wildcard characters , but none of them
exist in Unix C/C++ .
example :
find all files named like "demo_*.*"
Are there similar functions exist in Unix C/C++ ? ( don't use system() function )
If not , how to implement them with simplest methods ?
Thanks !!
:confused: ----- jesvh
The functions you are looking for are opendir(), readdir(), and closedir().
Here is a link:
http://www.tac.eu.org/cgi-bin/man-cgi?readdir+3
Regards,
Paul McKenzie