[pg-cvs] open-temporary-file

Elias Pipping pipping at lavabit.com
Mon Sep 19 16:40:01 UTC 2011


Hello,

the function `open-temporary-file` currently returns a stream and
nothing else. Consequently, `with-temporary-file` only exposes a
stream to its body. From my understanding it is (intentionally,
because streams are an abstraction) not possible to tell what the name
of the corresponding temporary file is just by that.

Could open-temporary-file be made to return the name of that file as
well?

I'd like to be able to write code like the following

(osicat:with-temporary-file (stream filename)
  (format stream "some content")
  (= 0 (sb-ext:process-exit-code (sb-ext:run-program "./test.sh" (list filename)))))

In other words, I'd like to pass strings in the form of (temporary)
files to a script/program that reads from the file whose name it is
passed and use `with-temporary-file` for that. Is that reasonable?


Best regards,

Elias Pipping





More information about the osicat-devel mailing list