It would be nice if it were possible to easily create a temporary directory. The Java File class has a method which creates a temporary file but it doesn't just create the File object but also the file on disk. Instead, it might create the object and then the user could decide at that point whether to create a file or directory from the name. The most straight forward approach would be to add a new method called createDir(). The current workaround is to create the file, delete the file, and then make the directory.