[alexandria-devel] Proposed addition of temporary file creation utilities

Kevin Reid kpreid at switchb.org
Sun Apr 22 19:54:32 UTC 2012


On Apr 22, 2012, at 15:26, Pascal J. Bourguignon wrote:
> Hans Hübner <hans.huebner at gmail.com> writes:
>> neither iolib nor osicat are the right place for temporary file handling operators like the one I proposed.  Both these libraries are specifically targeted towards POSIX systems, so there is no chance that they will cooperate, say, with ABCL.
> 
> A lot of systems implement the POSIX API.  
> http://en.wikipedia.org/wiki/POSIX
> 
> Does the JVM run on a non-POSIX plateform?  Does it not provide the mkstemp(3) POSIX function?  

Java (relevantly, the VM and the standard libraries) seeks to define its own platform. It does not, as a general rule, expose any of the POSIX APIs. There are many POSIX facilities which cannot be invoked without custom native code; I don't know offhand whether mkstemp(3), per se, is one of them.

A quick glance at the docs indicates that there is a facility to create a temporary file, but I do not know whether it is sound in the ways under discussion.

<http://docs.oracle.com/javase/6/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File)>

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>





More information about the alexandria-devel mailing list