c++ - std(boost)::filesystem::path number of components -


is there idiomatic way number of components in path using filesystem library? or have missed method this?

or have to, like, call parent_path() until root?

how size() method?

boost::filesystem::path p; // fill p std::cout << p.size() << std::endl; 

will give number of components.

also path iterators don't iterate on string of path, on components of path. should work too:

std::distance(p.begin(), p.end()); 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -