({{, OpenTemporary[]
opens a temporary file to which output can be written, and returns an (RefLink[OutputStream, paclet:ref/OutputStream]) object. }})

OpenersNotesSection(Spacer1)Details and Options

OpenTemporary is often used in conjunction with (RefLink[Put, paclet:ref/Put]) and (RefLink[Get, paclet:ref/Get]) as a way of preparing data that is exchanged between Mathematica and external programs.

OpenTemporary always creates a new file that does not already exist.

On Unix systems, OpenTemporary typically creates a file in the /tmp directory.

The global variable (RefLink[$TemporaryPrefix, paclet:ref/$TemporaryPrefix]) gives the base of the file name used by OpenTemporary.

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CreateDirectory, paclet:ref/CreateDirectory])  ▪  (RefLink[Close, paclet:ref/Close])  ▪  (RefLink[Run, paclet:ref/Run])  ▪  (RefLink[RunThrough, paclet:ref/RunThrough])  ▪  (RefLink[OpenWrite, paclet:ref/OpenWrite])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[External Programs, paclet:tutorial/ExternalPrograms])}})}})