If given a directory path in the form of a std::string, how can I get a dirent struct pointing to that directory?
I could start by getting a DIR* to the needed directory using opendir(). Then I could use readdir() on my DIR*, but that tries to return entries within the DIR*, not the DIR* itself.
So what is the appropriate way to achieve this?
struct dirent
? – Matstat()
to get the information you want. – clstrfsck