I suppose this is more of a UNIX question than a Linux question, but I'm not sure where else to post it.
I'm using the struct dirent (dirent.h) member d_type on an application I'm building, but I need to port it to a UNIX platform, and apparently d_type is only available in the GNU libraries. Does anyone know of an UNIX alternative I could use, or some methodology I could use to figure out if a an entry in a directory is a directory or file?
I thought about maybe reading inode entries, but I'm not sure how to do that.
Thanks for all your help!
The stat() function tells you all about a particular file.
Hey, thanks for your help! Switching from d_type to the functionality in stat.h worked to build the program. Now I'm running into a different problem... but I'll try to hunt down the answer first. =)