Directory Access with C/C++
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 ??
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.
so the readdir() opendir() etc.. are Unix Specific ??
So how to access Directories on Window (No Native C API is there for Windows ??)
So how to access Directories on Window (No Native C API is there for Windows ??)
Quote:Original post by nlbsI 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).
so the readdir() opendir() etc.. are Unix Specific ??
So how to access Directories on Window (No Native C API is there for Windows ??)
I believe that readdir, etc. are *nix system calls. They're definitely not standard C/C++ API's.
The Win32 equivalents would be FindFirstFile/FindNextFile.
The Win32 equivalents would be FindFirstFile/FindNextFile.
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...
EDIT:
"The Win32 equivalents would be FindFirstFile/FindNextFile." Anon Mike beat me to it...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement