class TempDirUtils {

    public static TempDir createTempDir() throws IOException {
        return new TempDir(createTempDirectory());
    }

    public static File createTempDirectory() throws IOException {<FILL_FUNCTION_BODY>}

    public static class TempDir {

        private final File tempDir;

        private TempDir(File tempDir) {
            this.tempDir = tempDir;
        }

        public File createFile(String fileName) {
            File file = new File(tempDir, fileName);
            file.deleteOnExit();
            return file;
        }

        public File getTempDir() {
            return tempDir;
        }
    }
}

        final File temp;

        temp = File.createTempFile("temp", Long.toString(System.nanoTime()));
        temp.deleteOnExit();

        if (!(temp.delete())) {
            throw new IOException("Could not delete temp file: " + temp.getAbsolutePath());
        }

        if (!(temp.mkdir())) {
            throw new IOException("Could not create temp directory: " + temp.getAbsolutePath());
        }


        return (temp);
    
<no_super_class>