Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RPTD

howto find files in code

This topic is 5233 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i`m writing POSIX compatible code for my project but ran into one stoopid problem... how can i find files in my code? POSIX allows for file operation like fopen and such, that works, and for directory reading it has readdir and co. problem is only that readdir doesn`t tell me (or at least i can`t be assured a POSIX system can tell me), if a directory entry is a file or directory. anybody knows if there is a portable function for this or do i have to #ifdef my way to success?

Share this post


Link to post
Share on other sites
Advertisement
i've seen this one, yeah.
only drawback is that i have to construct a full string each time i wanna check the file.
i hoped there is a shorter way (ok... except you chdir your way through, and except dirent struct has a d_type field).

[edited by - RPTD on March 23, 2004 3:39:48 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!