Re: Temporary File Creation

2020-06-28 Thread Per Nordlöw via Digitalmars-d-learn
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 ope

Re: Temporary File Creation

2020-06-22 Thread Jonathan M Davis via Digitalmars-d-learn
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/li

Re: Temporary File Creation

2020-06-22 Thread Stanislav Blinov via Digitalmars-d-learn
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.html

Temporary File Creation

2020-06-22 Thread Per Nordlöw via Digitalmars-d-learn
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

Re: Temporary file creation for unittests

2018-05-21 Thread Atila Neves via Digitalmars-d-learn
On Monday, 21 May 2018 at 15:20:14 UTC, Dr.No wrote: On Monday, 21 May 2018 at 15:16:11 UTC, Atila Neves wrote: On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found Not offic

Re: Temporary file creation for unittests

2018-05-21 Thread Atila Neves via Digitalmars-d-learn
On Monday, 21 May 2018 at 17:03:40 UTC, Russel Winder wrote: On Mon, 2018-05-21 at 15:16 +, Atila Neves via Digitalmars-d-learn wrote: On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: > Hi, > > What's the current official position on how to create > temporary files for use duri

Re: Temporary file creation for unittests

2018-05-21 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2018-05-21 at 15:16 +, Atila Neves via Digitalmars-d-learn wrote: > On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: > > Hi, > > > > What's the current official position on how to create temporary > > files for use during a unittest. I found > > Not official, but... > >

Re: Temporary file creation for unittests

2018-05-21 Thread Dr.No via Digitalmars-d-learn
On Monday, 21 May 2018 at 15:16:11 UTC, Atila Neves wrote: On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found Not official, but... import unit_threaded; with(const

Re: Temporary file creation for unittests

2018-05-21 Thread Atila Neves via Digitalmars-d-learn
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found Not official, but... import unit_threaded; with(const Sandbox()) { writeFile("myfile.txt", "contents");

Re: Temporary file creation for unittests

2018-05-20 Thread Joakim via Digitalmars-d-learn
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found https://github.com/dlang/phobos/pull/5788 but it seems to be languishing in the "we have discussed all the issues that no

Re: Temporary file creation for unittests

2018-05-18 Thread Dr.No via Digitalmars-d-learn
On Friday, 18 May 2018 at 15:30:05 UTC, Uknown wrote: On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found https://github.com/dlang/phobos/pull/5788 but it seems to be langui

Re: Temporary file creation for unittests

2018-05-18 Thread Uknown via Digitalmars-d-learn
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found https://github.com/dlang/phobos/pull/5788 but it seems to be languishing in the "we have discussed all the issues that no

Temporary file creation for unittests

2018-05-18 Thread Russel Winder via Digitalmars-d-learn
Hi, What's the current official position on how to create temporary files for use during a unittest. I found https://github.com/dlang/phobos/pull/5788 but it seems to be languishing in the "we have discussed all the issues that no-one will ever have a problem with" phase. What to do between no