Tempfiles in unittests

Magnus Lie Hetland magnus at hetland.org
Sat Mar 10 06:44:26 PST 2012


On 2012-03-09 18:42:01 +0000, Jonathan M Davis said:

> File has a name property. You can do something like
> 
> auto file = File.tmpfile();
> auto filename = file.name;
> auto str = readText(filename);

Yeah -- again, sorry my original post was so verbose, but part of the 
"problem spec" was that my tempfiles don't seem to have names (i.e., 
they are unnamed tempfiles, and file.name is null; platform-dependent, 
I think).

Otherwise, this wouldn't have been a problem :)

-- 
Magnus Lie Hetland
http://hetland.org



More information about the Digitalmars-d-learn mailing list