boost::filesystem - relative paths
I have some path (Folder) that I'm searching:
Code:
for (directory_iterator It (Folder); It != EndIt; ++It) {
Contents.push_back (*It);
}
Now, I have a map:
std::map<string, bfs::path>
The first member should contain the path of the file or folder (which is the second member) relative to Folder.
Does boost::filesystem provide a simple way to do this, or am I going to have to write my own function? path::relative_path ( ) seems to be of no help, because it will only return paths relative to the root (e.g. the drive letter on windows).