Cross-platform way to get files and folders inside a given folder

Started by
11 comments, last by swiftcoder 15 years, 6 months ago
I'm thinking I'd better implement saving into my game soon. In order to do that, I need to implement file dialogs. I need some cross-platform way (at least Mac and Windows) to find the files and folders inside a given start folder. My project is written in C++ and uses SDL, if that is any help.
Advertisement
Boost.Filesystem
[TheUnbeliever]
Quote:Original post by TheUnbeliever
Boost.Filesystem
QFE.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Anything that doesn't require Boost? :[

Then again, I probably want to pick up Boost eventually...
Quote:Original post by Guy Meh
Anything that doesn't require Boost? :[


Java. Or you can do the same like the rest, and create your own file "dialogs".

Quote:Original post by Guy Meh
Anything that doesn't require Boost? :[
PhysFS. Might be a bit heavyweight for what you want, but it is a very decent system.
Quote:Then again, I probably want to pick up Boost eventually...
QFT.
Quote:Original post by Raghar
Java. Or you can do the same like the rest, and create your own file "dialogs".
Pretty sure he is in C++ here, and that this is about implementation, not GUI.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

You could also consider using a cross platform GUI toolkit like wxWidgets to handle things for you.
I agree with SiCrane - WxWidget its what you need. Easy to use and very powerfull.
Quote:Original post by guvidu
I agree with SiCrane - WxWidget its what you need. Easy to use and very powerfull.
The OP asked for a way to iterate a directory - not render a GUI widget. wxWidgets is fine for an editor, but it is extremely hard to integrate in to a game.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by swiftcoder
PhysFS. Might be a bit heavyweight for what you want, but it is a very decent system.


I've read about PhysFS, since I was also thinking about using it to handle my save files. I've noticed though that it looks pretty low-level, where I'm pretty much working with raw bits. Is there any wrapper or something that makes it a bit higher-level, sort of like the iostream classes in C++?

This topic is closed to new replies.

Advertisement