digitalmars.D.learn - Temporary File Creation
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (5/5) Jun 22 2020 Has anybody written a procedure for creating a temporary file in
- Stanislav Blinov (6/11) Jun 22 2020 tempDir just returns a path (i.e. "/tmp" or whatever it is on
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/8) Jun 28 2020 Thanks.
- Jonathan M Davis (6/11) Jun 22 2020 I created a PR for one a while back that resulted in a surprisingly larg...
Has anybody written a procedure for creating a temporary file in a race-free manner? And why has such a procedure not already been added to std.file when std.file.tempDir has? See: https://dlang.org/library/std/file/temp_dir.html
Jun 22 2020
On Monday, 22 June 2020 at 21:46:57 UTC, Per Nordlöw wrote:Has anybody written a procedure for creating a temporary file in a race-free manner? And why has such a procedure not already been added to std.file when std.file.tempDir has? See: https://dlang.org/library/std/file/temp_dir.htmltempDir just returns a path (i.e. "/tmp" or whatever it is on Windows, etc.), it doesn't create anything. Given the synopsis of std.file, a procedure for *creating* a file doesn't belong there, as it would only be half of an operation. There is a https://dlang.org/library/std/stdio/file.tmpfile.html
Jun 22 2020
On Monday, 22 June 2020 at 23:53:41 UTC, Stanislav Blinov wrote:tempDir just returns a path (i.e. "/tmp" or whatever it is on Windows, etc.), it doesn't create anything. Given the synopsis of std.file, a procedure for *creating* a file doesn't belong there, as it would only be half of an operation. There is a https://dlang.org/library/std/stdio/file.tmpfile.htmlThanks.
Jun 28 2020
On Monday, June 22, 2020 3:46:57 PM MDT Per Nordlöw via Digitalmars-d-learn wrote:Has anybody written a procedure for creating a temporary file in a race-free manner? And why has such a procedure not already been added to std.file when std.file.tempDir has? See: https://dlang.org/library/std/file/temp_dir.htmlI created a PR for one a while back that resulted in a surprisingly large amount of arguing. IIRC, there were some tweaks I still needed to make to get it merged, but I keep forgetting to get back to it. - Jonathan M Davis
Jun 22 2020