Documentation for System.IO.openTempFile (and functions whose documentation refer to it) seems incorrect
The documentation for System.IO.openTempFile
states that the second parameter is a 'File name template. If the template is "foo.ext" then the created file will be "fooXXX.ext" where XXX is some random number' (my emphasis). The documentation for the openBinaryTempFile
,
openTempFileWithDefaultPermissions
and openBinaryTempFileWithDefaultPermissions
functions refer back to this documentation.
However, commit ad617a3e altered the behaviour of openTempFile
, so that it uses the process ID, and then increments that if necessary to obtain a filename which is unique. Given that this is not random (but rather, is deterministic, given the process ID and the state of the file system) the documentation should be updated to reflect this.