This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: directories for newbies
- From: "Rupert Wood" <me at rupey dot net>
- To: "'danny'" <danny at 3rdplanetsoftware dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 22 Jul 2002 08:56:54 +0100
- Subject: RE: directories for newbies
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.