|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-10 03:25:10
David Abrahams wrote:
> > We have a similar case with remove(), which is reported by remove()
> > returning a bool indicating if it actually removed anything.
> >
> > It would be quite consistent for create_directory() to return a bool
> > indicating if it actually had to create the directory.
>
> FWIW, I think that's the right approach.
I agree, too. Returning bool far more elegant than using second parameter or
two different functions.
BTW, this revives old thread about better name for 'create_directories'. The
best alternative name, in my opinion, was 'demand_directory', because that
emphasize that directory may exist already.
But if 'create_directory' is changed as now suggested, "demand" suffix in
"demand_directory" will not mean anything.
So, what would be better name of create_directories:
create_directory_and_parents
create_path
demand_path
?
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk