Jump to content
  • Advertisement
Sign in to follow this  
yacwroy

C++ cross-platform directory query

This topic is 3792 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

Hi. I am writing a bit of code that needs to query and modify the contents of a directory portably. What's the simplest _portable_ way to test if a member of a directory is a file? I know boost::filesystem has isdirectory(), which is probably fine for me, but I'm just wondering what other methods there are. I'm probably using either "dirent.h" or boost's basic_directory_iterator (or whatever it's called) to identify directory contents. I googled for a while but (except for boost) most of my hits were either not cross platform or were very vague on distinguishing between files and directories. Thanks for all assistance.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!