NIO: missing createTempFile() and deleteOnExit()

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz xxxxx at yyyy.zz
Wed May 28 03:07:23 PDT 2008

I'm very interested to play with the NIO in the fields of portable applications to use it for encrypted filesystems in a singel file and so on. To port existing applications and dbs it would be nice to have two more things in the NIO: createTempFile() and deleteOnExit().

If I missed it in the existing NIO please give me a hint.

Otherwise my proposals just need very little modification of the existing interfaces.


static File createTempFile(String prefix, String suffix) 
static File createTempFile(String prefix, String suffix, File directory) 
---> public abstract Path createFile(Attribute<?>... attrs) throws IOException
                  with Attributes for prefix, suffix [and directory]
( or by breaking the existing interface
        ---> public abstract Path createTempFile(...) throws IOException )

void deleteOnExit() 
---> public static final StandardOpenOption DELETE_ON_EXIT

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the nio-dev mailing list