Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if path is valid in boost::filesystem?

Tags:

c++

boost

I am setting a boost::filesystem::path from an edit field. I notice that the constructor is happy to accept invalid characters for the filename.

How can I use boost::filesystem to check if the boost::filesystem::path object represents a valid filename?

like image 955
Dan Nissenbaum Avatar asked May 03 '12 07:05

Dan Nissenbaum


1 Answers

Have a look here:

http://www.boost.org/doc/libs/release/libs/filesystem/doc/portability_guide.htm

This describes various functions for checking whether filenames are valid or not.

like image 84
Nick Avatar answered Sep 30 '22 02:09

Nick