If set to AutoDelete.yes (the default), the file is deleted from the file system after the file handle is closed. Otherwise, the file must be deleted manually.
Directory to create the temporary file in. By default, this is tempDir.
Creates a temporary file and writes to it.
auto f = tempFile.file; assert(f.position == 0); f.write("Hello"); assert(f.position == 5);
Creates a temporary file, but doesn't delete it. This is useful to ensure a uniquely named file exists so that it can be written to by another process.
auto path = tempFile(AutoDelete.no).path;
Creates a temporary file. The file is automatically deleted when it is no longer referenced. The temporary file is always opened with both read and write access.