How do you test if an argument passed is a directory???
Expected argument:
program name, filename, pattern 1, pattern 2
Thanks
Signed,
Chris Beech
How do you test if an argument passed is a directory???
Expected argument:
program name, filename, pattern 1, pattern 2
Thanks
Signed,
Chris Beech
We need to know more information, for example the OS would be nice.
Using Red Hat Linux as OS and C as language.
man [2] readdir
The 2 may not be correct for Red Hat, that is where it is in the default for Slackware 10.2.
>How do you test if an argument passed is a directory???
The stat() function will provide you the required information.
Consider using nftw or ftw these functions were meant for this purpose - searching a file tree.