protected static URL findConfigUrlInDirectory ( File directory , String configName ) { if ( directory . isDirectory ( ) ) { File cfile = new File ( directory , configName ) ; if ( cfile . isFile ( ) ) { try { return cfile . toURI ( ) . toURL ( ) ; } catch ( MalformedURLException e ) { throw new RuntimeException ( e ) ; } } } return null ; }
Returns a URL to a file with the given name inside the given directory .