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 {
public:
    explicit scoped_file(const boost::filesystem::path& file)
      : m_path(file) {}

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

private:
    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?

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk