|
Boost Users : |
From: Bill Buklis (boostuser_at_[hidden])
Date: 2007-11-20 14:35:09
>
> What is then the best way, to find all windows roots with the current
> version?
> Have you some example code?
>
I haven't used filesystem, so I don't know how to do it in that. But, it is
quite easy to obtain the available drive letters in Windows using the
GetDriveType API call. Perhaps you can build a list separately and then
match it with boost::filesystem as needed. Of course, keep in mind that any
drive list is subject to change. It's certainly possible that the user may
map new drives or delete existing ones after you built your list.
Another consideration is that not all "roots" are drive letters. UNC paths
are quite valid. There is no reasonable way to obtain a complete list there.
It's somewhat possible, but would be extremely time consuming.
Hope that helps some,
-- Bill --
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net