@ NotNull public static File createTempDirectory ( @ Nullable final File base ) throws IOException { final File tempDir = new File ( base , "dctemp" + UUID . randomUUID ( ) . toString ( ) ) ; if ( tempDir . exists ( ) ) { return createTempDirectory ( base ) ; } if ( ! tempDir . mkdirs ( ) ) { throw new IOException ( "Could not create temp directory `" + tempDir . getAbsolutePath ( ) + "`" ) ; } LOGGER . debug ( "Temporary directory is `{}`" , tempDir . getAbsolutePath ( ) ) ; return tempDir ; }
Creates a unique temporary directory in the given directory .