public static File getTempDirectory ( ) { if ( tempFile != null ) return tempFile ; final String tmpStr = System . getProperty ( "java.io.tmpdir" ) ; if ( tmpStr != null ) { tempFile = new File ( tmpStr ) ; if ( tempFile . exists ( ) ) { tempFile = getCanonicalFileEL ( tempFile ) ; return tempFile ; } } try { final File tmp = File . createTempFile ( "a" , "a" ) ; tempFile = tmp . getParentFile ( ) ; tempFile = getCanonicalFileEL ( tempFile ) ; tmp . delete ( ) ; } catch ( final IOException ioe ) { } return tempFile ; }
returns the Temp Directory of the System