Boost logo

Boost :

Subject: [boost] [Filesystem V3] file_status over-design?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2010-02-23 08:26:37


Both Filesystem V2 and V3 status() functions return an object of class
file_status. file_status is just a thin wrapper around a file_type
enum:

      enum file_type { status_error, file_not_found, regular_file,
directory_file,
                       symlink_file, block_file, character_file,
fifo_file, socket_file,
                       type_unknown
                     };

It was designed that way on the assumption that file_status would
eventually include additional state information.

But that never happened, so it looks like over-design my part.

The fix would be to rename the enum as file_status, and remove the
current class file_status entirely. That would break a certain amount
of existing code, but I suspect the C++ committee would force such a
change anyhow for TR2, so better to get it over with now.

Comments? Opinions?

--Beman


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