Jump to content
  • Advertisement
Sign in to follow this  

How to get the file extension using boost filesystem

This topic is 2778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[font=arial,helvetica,sans-serif]Hello I've just finally figured out how to use and install boost.

I'm able to

1.Check the contents of a folder aka 'directory'

2.Check if a file is a directory or not,

3.Check if a file is a regular file

4.Check if a file exists[/font]

[font=arial,helvetica,sans-serif]But how do I check what file extension my contents of a directory has for example

if I had a folder called


inside folder1 would be three files.


each file with its own extension like so


how would I in boost check folder1 for its contents and then check what file extensions each file has and then do something like cout the extension

cout << extension << endl;

using boost filesystem

thanks for any advice or ideas you may have it has tooken me a while to figure out how to use boost but I finally figured it out you don't use bootstrap.bat but build.bat to get bjam biggrin.png[/font]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!