question: private String findTempDir ( ) { for ( String path : PATHS ) { File logFile = new File ( path , "admin.log" ) ; try { logFile . createNewFile ( ) ; if ( logFile . canWrite ( ) ) { return path ; } } catch ( IOException e ) { } } return "" ; }
target:  Find temporal path with writing permissions depending on the Operating System.