boost::filesystem - relative paths

This is a discussion on boost::filesystem - relative paths within the C++ Programming forums, part of the General Programming Boards category; I have some path (Folder) that I'm searching:
Code:
for (directory_iterator It (Folder); It != EndIt; ++It) {
Contents.push_back (*It);
...

boost::filesystem - relative paths

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).

If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein