From: Jeff Garland (jeff_at_[hidden])
Date: 2003-04-17 09:38:00


On Thu, 17 Apr 2003 17:41:24 +0400, Vladimir Prus wrote
> 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.

Yes, these would be useful as this problem comes up quite frequently.

Jeff