My current working directory is located at /home/myuser/program
, I created a boost::filesystem::path
object pointing to it. I appended /../somedir
so it becomes /home/myuser/program/../somedir
. But I need to get its resolved absolute path, which would be /home/myuser/somedir
.
I have been trying for long time and I do not find any method in their reference to do this. There is a method called make_absolute
, which seems to be supposed to do what I expect, but I have to give it a “root” path argument. Which should it be? do I really need to do this to get the real absolute path? Is there any other way?