Jump to content
  • Advertisement
Sign in to follow this  
coderchris

Checking existance of a directory in c++

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

Im looking for a way to check wether or not a directory exists using standard c++. Id rather not use any external libraries (like the windows API) unless there really is no other way to do it. Iv googled around with no luck. On the same topic, Im also wondering if there is a function(s) to get a list of all the files/directories in a certain location thanks, chris

Share this post


Link to post
Share on other sites
Advertisement
Standard C++ has no notion of directories; you need to use a third party library or API to deal with them.

Share this post


Link to post
Share on other sites
Quote:
Original post by coderchris
Im looking for a way to check wether or not a directory exists using standard c++. Id rather not use any external libraries (like the windows API) unless there really is no other way to do it. Iv googled around with no luck.


Alas, there is no standard way to do this yet. The Boost.FileSystem library, or a variant of it, is likely to be adopted in to TR2, so I'd recommend using that (and it's easier to use than most platform specific APIs).

Quote:
On the same topic, Im also wondering if there is a function(s) to get a list of all the files/directories in a certain location


Again, see Boost.FileSystem.



Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!