简体   繁体   中英

boost::filesystem v3 - correct case of path

Hi Is there an efficient way of correct the case of an given windows path?

fs::path dir("c:/winDOWS"); --> C:/Windows?

(without Windows-API!)

Without the windows api it's impossible to know that the correct case is. The common windows filesystems are case-insensitive and case preserving.

The windows api way to do this is GetFullPathName

Since I came here looking for the same thing I figured I would spare others a google.

An answer can be found in this stackoverflow thread .

It is sadly not how to do it with boost instead using the Windows API. But at least it works which the API mentioned above does not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM