Jump to content
  • Advertisement
Sign in to follow this  
nlbs

Directory Access with C/C++

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

Is there any standered (not 3rd party) Librery in C++ that can be used to access directories like C the API. are the C API readdir() opendir() etc.. Cross Platform ??

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by nlbs
Is there any standered (not 3rd party) Librery in C++ that can be used to access directories like C the API.

No.
Quote:
are the C API readdir() opendir() etc.. Cross Platform ??

No.

Use a third-party API like boost. That's what it's tere for.

Share this post


Link to post
Share on other sites
so the readdir() opendir() etc.. are Unix Specific ??
So how to access Directories on Window (No Native C API is there for Windows ??)

Share this post


Link to post
Share on other sites
Quote:
Original post by nlbs
so the readdir() opendir() etc.. are Unix Specific ??
So how to access Directories on Window (No Native C API is there for Windows ??)
I recommend the use of Boost as suggested above. That way, you'll only have to write the code once (rather than multiple times, once for each platform/API).

Share this post


Link to post
Share on other sites
Directory access and file system access are a very OS specific sort of thing. I would recommend either using Boost Filesystem, or hitting up msdn.microsoft.com to try to find docs on the old Win32 API.

EDIT:
"The Win32 equivalents would be FindFirstFile/FindNextFile." Anon Mike beat me to it...

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.

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!