|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-12-18 12:32:05
Volodya,
>>>Agreed. BTW, where would that header live? In CVS tree or in sandbox?
>>>And what would be the access rules?
>No comment on this? Or, specifically, do you plan to add convenience.hpp
to
>some CVS tree and place create_directories there any time soon?
I've just added these convenience files to the main CVS:
boost/filesystem/convenience.hpp
libs/filesystem/doc/convenience.htm
libs/filesystem/src/convenience.cpp
libs/filesystem/test/convenience_test.cpp
plus updated doc/index.htm, and the build and test Jamfiles to reference
convenience.
Take a look and see if I've missed anything.
doc/convenience.htm is just a shell; I'm hoping you'll add
create_directories() docs.
There needs to be some kind of precondition. Maybe:
!exists(ph) || is_directory(ph)
but it is more complicated than that. Say you code:
create_directories( "xx/yy/zz" );
If zz doesn't exist, and xx/yy does, then xx/yy has to be a directory;
xx/yy can't be a file. I'm not sure how to express a recursive
precondition.
What are the postconditions? In your posting, you gave:
exists(ph) && is_directory(ph) && is_empty(ph)
But is_empty(ph) would only apply if a new directory was created.
There are also the cases create_directory("") and
create_directory("/"). Are these benign, precondition errors, or what?
Thanks,
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk