From 8ed241a1f018c2b5b557dc07b0cce8e4cfc826e8 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 17 Sep 2016 16:56:16 +0200 Subject: posix: add mkstemp --- lib/posix/posix.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index bd69b2328..bdc0dd058 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -2653,6 +2653,12 @@ proc poll*(a1: ptr TPollfd, a2: Tnfds, a3: int): cint {. proc realpath*(name, resolved: cstring): cstring {. importc: "realpath", header: "".} +proc mkstemp*(tmpl: cstring): cint {.importc, header: "".} + ## Create a temporary file. + ## + ## **Warning**: The `tmpl` argument is written to by `mkstemp` and thus + ## can't be a string literal. If in doubt copy the string before passing it. + proc utimes*(path: cstring, times: ptr array[2, Timeval]): int {. importc: "utimes", header: "".} ## Sets file access and modification times. -- cgit 1.4.1-2-gfad0