18 Jul
2009
18 Jul
'09
9:51 p.m.
Alexander Lamaison a écrit :
I was looking for exactly such a thing just yesterday and was surprised to find that boost::filesystem didn't have one. Here's the function I wrote instead (Windows only) in case it's of any use:
It is not so surprising. The contrary do it to me ;) On Linux, it exists some functions that do the stuff. But the equivalents to GetTempPath Win32 function are considered as security flaws (the man says it !). Because of race conditions. So they are tmpfile and mkstemp that compute a temporaty name and open the file. Maybe we can write a wrapper around one of them. But the file will be open ! -- Mickaël Wolff aka Lupus Michaelis Racine http://lupusmic.org Blog http://blog.lupusmic.org