Boost logo

Boost :

From: at_at_[hidden]
Date: 2005-09-10 03:38:10


If same library uses c++ streams programer can choose between stream in
memory or for example temp-file. If you need to write lot of data to
stream may be it's better to have it on disk. Worst think is when you need
to pass stream (or file) to other non-c++-stream lib/process.

Btw, there can be also temp-directory (??).

I propose to create 2 (or more?) classes :
1. Class where file will be hidden, programer will use it by
        file-descriptor or any other handle.
        On Unix file would be removed after openning.
        On Win32 we can use tempfile's flag to CreateFile() - file will
        be also invisible ?.
        We don't need to care about removing file on destruction.

2. Class where we can extract file name and use it.
        File will be removed on destruction.
        We need to remember about file permissins etc.

3. Any idea ?

On Fri, 9 Sep 2005, Dylan Trotter wrote:

> The more I think about this problem, the more I think it's about stream
> buffers instead of the actual streams. In particular, you have a
> temp_filebuf class whose lifetime determines the lifetime of the
> filesystem object:
>


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