Skip to main content
gamedev.net
🔒 Locked

List folder content

Started by Furie 3 replies 1.2k views
Original Post
Furie
Furie
How can I, in c++, in linux, list a folders content? to se what files and sub folders is in it?
PaulCunningham
PaulCunningham
I use the boost::filesystem library.

cross platform too!

www.boost.org if you are interested.



Cheers,Paul CunninghamPumpkin Games
NicoDeLuciferi
NicoDeLuciferi
or if you want to do it yourself, have a look at scandir.
It's in the dirent.h header..

/Nico
Furie
Furie
thanx! ^^ just what I needed
coldacid
coldacid
boost::filesystem is much simpler to use, but I run into problems with directory_iterator when there are 0 or 1 files in a directory. YMMV.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.