Sign in to follow this  
nlbs

Directory Access with C/C++

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this