directories for newbies

Rupert Wood me@rupey.net
Mon Jul 22 00:57:00 GMT 2002


Danny wrote:

> I'm look for a function to get me the attributes of a file. Such as is
> the file a directory or not. Any ideas?

Stat(); test for the S_IFDIR bit set in st_mode. See the manual pages
for stat and the mknod function (in section 2 - not the mknod utility in
section 1).

Rup.



More information about the Gcc-help mailing list