From 305d4df9b8b9c9204bd6f6e1aec016bf39df5b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 16 Oct 2023 15:12:09 +0200 Subject: Document call-with-tmpfile. --- doc/ref/general/io.texi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/ref') diff --git a/doc/ref/general/io.texi b/doc/ref/general/io.texi index e7ff51fa..770c21b0 100644 --- a/doc/ref/general/io.texi +++ b/doc/ref/general/io.texi @@ -26,6 +26,12 @@ the file, and @code{#f} otherwise. @end defun @defun call-with-tmpfile proc [#:tmpl ``/tmp/file-XXXXXXX''] +Creates a new temporary file, named per the template @var{tmpl}, then +call @var{proc} with two arguments: an open input-output port to the +file, and the generated name of the file. + +The file will be closed upon the procedures return. However, the file +@emph{may} be left on disk. @end defun @defun read-file path -- cgit v1.2.3