Reading directories in c/c++

Started by
0 comments, last by SiCrane 18 years, 4 months ago
Hello, I'm trying to generate a list of all the sub folders and files for a specific directory. As im going through the folders the names of the files will get stored in an html document. The problem im having is finding the number of files/folders that are already in a specific directory and then getting a pointer to that list. I'm currently using the "struct _stat" stucture but this only gives me the number of links to a specific file. Does anyone know how to do what im trying to accomplish. It should be noted that im working on a windows platform so a lot of the unix commands im used to using for this type of problem wont work. Thank you Jon
www.lefthandinteractive.net
Advertisement
I would use boost::filesystem, though you can also try the Win32 API functions FindFirstFile() and FindNextFile().

This topic is closed to new replies.

Advertisement