Jump to content
  • Advertisement
Sign in to follow this  
DominicHughes

How to get the file extension using boost filesystem

This topic is 2412 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

folder1

inside folder1 would be three files.

mymum.txt
mydad.vim
mygranny.max

each file with its own extension like so

.txt
.vim
.max

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!