Boost logo

Boost :

Subject: [boost] [filesystem] scoped_file feature request?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-10-11 08:47:08

There is a long outstanding feature request, #1090 from Marcus
Lindblom, requesting the following be added to Boost.Filesystem:

class scoped_file {
    explicit scoped_file(const boost::filesystem::path& file)
      : m_path(file) {}

    ~scoped_file() { boost::filesystem::remove(m_path); }

    boost::filesystem::path m_path;

My weakly held opinion is that this request should be rejected.
Rationale: Easy enough for users to do themselves, so it doesn't
justify the additional surface area it would add to of the library.

Does anyone have a killer argument for adding it?


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