Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing ..'s in boost filesystem::complete

Tags:

c++

file-io

boost

This should be simple: I'm composing an absolute path with boost filesystem, however it's returning a really ugly path:

D:/Projects/SomeDir/vc10/../resource/plugins/SomeFile.dll

Is there a boost way of automatically handling .'s and ..'s?

All I'm doing is:

boost::filesystem::complete("../resource/plugins/SomeFile.dll")

it's using boost::filesystem2.

like image 226
ansiart Avatar asked May 03 '11 19:05

ansiart


1 Answers

boost::filesystem::complete("../resource/plugins/SomeFile.dll").normalize()
like image 125
Ferruccio Avatar answered Sep 24 '22 02:09

Ferruccio