Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2003-01-02 07:53:36


Hi Alberto,

Alberto Barbati wrote:
> Hi,
>
> first of all, I want to thank Beman Dawes and all others that
> contributed with the design and development of the Filesystem library.
> It's a wonderful piece of work.
>
> I just would like to propose a couple of additions that I believe are
> very useful. Both features regard temporary files.
>
> First proposal: I propose to add a function with a signature of this kind:
>
> path generate_path_for_temp_file();

IIRC functions like this are considered a bad idea. They are subject to
race conditions and a potential security problem.

I agree with you, that the functionality would be really helpfull. The
usual solution to the race condition problem would be to have a function
that returns a stream. See mkstemp on POSIX. Win32 has a similar facility.

Thomas

-- 
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet 
Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de

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