TempFile¶
Import: import system.io;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
TempFile¶
Owns a read/write file inside a private temporary directory and cleans both deterministically.
file¶
Borrowed access to the owned temporary file.
path¶
Path of the temporary file before persistence; its containing directory is private.
create¶
Creates a temporary read/write file under the OS temporary directory.
create_in¶
Creates a private file on the selected directory's filesystem.
persist_replace¶
Flushes and closes the file, then atomically replaces a destination on the same filesystem. Failed replacement leaves the destination and temporary file intact; durability is not implied.
close¶
Closes the file and removes its private directory, reporting either cleanup failure.