question: private File findFile ( File directory , String name ) throws FileNotFoundException { File file = new File ( directory , name ) ; if ( file . exists ( ) ) { return file ; } for ( String child : directory . list ( ) ) { if ( child . equalsIgnoreCase ( name ) ) { return new File ( directory , child ) ; } } throw new FileNotFoundException ( "Missing file: " + file ) ; }
target:  Finds the named file in the named directory. This tries extra hard to avoid case-insensitive-naming problems, where the requested file is available in a different casing.