Boost logo

Boost :

From: Keith Burton (kb_at_[hidden])
Date: 2002-08-01 02:28:23


It should do nothing and return nothing as the operation has succeeded
in that the post condition is true.

( This being much preferable to an attempt to avoid the exception by
doing
        if ( exists( ph ) ) remove( ph ) ;
 and the post condition not being true )

Keith

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Mattias Flodin
Sent: 01 August 2002 07:52
To: boost_at_[hidden]
Subject: Re: [boost] Review Request: Filesystem Library

On Wed, Jul 31, 2002 at 07:01:36PM +0100, Keith Burton wrote:
> Incidentally , I do not believe that remove should throw if ! exists(
> ph). My rationale being the ones who care can use exists( ph ) before

> and those who do not get least surprise.

So what should it do instead, return nothing and throw nothing, leaving
the user unknowing of the operation's success or failure?

Just because the file existed when you called exists() doesn't mean it
still exists when you call remove().

/Mattias

-- 
Mattias Flodin <flodin_at_[hidden]>  -  http://www.cs.umu.se/~flodin/ Room
NADV 102 Department of Computing Science Umeå University S-901 87 Umeå,
Sweden
--
I like to tell people I have the heart of a small boy. Then I say it's
in a jar on my desk. -- Stephen King
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

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