1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 03:54:12 +02:00

Add tmpfile(3) to libguile.

* libguile/posix.c (scm_tmpfile): New primitive.
* libguile/posix.h (scm_tmpfile): New func decl.

* doc/ref/posix.texi (File System): Document `tmpfile'.
This commit is contained in:
Thien-Thi Nguyen 2010-02-12 16:01:16 +01:00 committed by Andy Wingo
parent 1772145c02
commit cd53bd3668
3 changed files with 27 additions and 0 deletions

View file

@ -948,6 +948,15 @@ which is usual for ordinary file creation,
@end example
@end deffn
@deffn {Scheme Procedure} tmpfile
@deffnx {C Function} scm_tmpfile
Return an input/output port to a unique temporary file
named using the path prefix @code{P_tmpdir} defined in
@file{stdio.h}.
The file is automatically deleted when the port is closed
or the program terminates.
@end deffn
@deffn {Scheme Procedure} dirname filename
@deffnx {C Function} scm_dirname (filename)
Return the directory name component of the file name