Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-08-05 20:32:16


At 11:43 AM 8/5/2002, Yitzhak Sapir wrote:

>...
>confusing several things together:
>1) drive unmounts
>2) postcondition
>3) exception handling vs return values
>
>In my opinion the main question that should be asked in each of these
cases
>is how the program would normally want to handle the issue.
>1) In case of drive unmounts (or path unmounts) it might want to stop
what
>it were doing in case it was trying to delete several files in that
path.
>So an exception should be thrown that tells the program what is the
longest
>part of the path that is still accessible ...

There are problems with that approach.

The Filesystem Library is supposed to provide relatively low-level, almost
atomic, tools which can in turn be used to implement higher level
tools. The recursive probing required to implement your suggested
semantics aren't the sort of basic tool semantics required for
boost::filesystem. They are more an example of a higher level tool you
could construct from boost::filesystems.

Also, remember that boost::filesystem has to take what the operating
systems dish out. We don't have the luxury of designing all semantics from
scratch.

--Beman


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