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

拈花ヽ惹草 提交于 2020-01-20 07:57:26

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/10426671/how-to-check-if-path-is-valid-in-boostfilesystem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!