tempFile


Description:

public static Path? tempFile (string prefix, string suffix)

Creates a temporary file and returns its path.

Example:

    var tmpPath = Files.tempFile ("myapp", ".tmp");
if (tmpPath != null) {
Files.writeText (tmpPath, "temp data");
}

Parameters:

prefix

the prefix for the temporary file name.

suffix

the suffix (extension) for the temporary file name.

Returns:

a Path to the created temporary file, or null on error.