Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-04-17 08:41:24

I think that the filesystem library would very benefit from two functions:

     std::string extension(const boost::filesystem::path&);
     boost::filesystem::path change_extension(const boost::filesystem::path&,
        const std::string& new_suffix);

and, probably,

     std::string basename(const boost::filesystem::path&);

The intent is to get/change the part of leaf name after the first dot. I
needed the change_extension in a couple of contexts, and just now cleaning up
an old code where a check for correct extension is made. Do others agree that
those functions are very usefull? I can write/document them in that case.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at