|
Boost : |
From: Rob Stewart (stewart_at_[hidden])
Date: 2005-09-09 14:45:09
From: at_at_[hidden]
>
> I didn't know about that, because on win32 there is a problem with
> deleting open files. On unix systems (probably most or all of them)
> you can delete file and when last handle is closed kernel automatically
> removes file - it's great solution.
>
> Anyway, same people on unix (in same cases) first open temp file,
> then remove it and then use it - no one could do anything with your file.
Unlinking a file after opening it is a good way to ensure no
other user can manipulate the file. However, short of
duplicating file handles for other processes, one can't share the
file after unlinking it. The pathname is no longer valid, and
that's how one accesses a file with Boost.Filesystem.
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk