public void verify ( String pkg , File path , Configuration conf ) { if ( ! path . isDirectory ( ) ) { throw new IllegalArgumentException ( path . getAbsolutePath ( ) . concat ( " is not a directory." ) ) ; } for ( File file : path . listFiles ( ) ) { if ( file . isDirectory ( ) ) { verify ( combine ( pkg , file . getName ( ) ) , file , conf ) ; } else { String fileName = file . getName ( ) ; int extensionSeparator = fileName . lastIndexOf ( ' ' ) ; if ( extensionSeparator >= 0 ) { String extension = fileName . substring ( extensionSeparator + 1 ) ; if ( extension . equals ( "class" ) ) { String className = combine ( pkg , fileName . substring ( 0 , extensionSeparator ) ) ; try { byte [ ] digest = conf . getJobService ( ) . getClassDigest ( className ) ; if ( digest == null ) { System . out . print ( "? " ) ; System . out . println ( className ) ; } else if ( ! matches ( file , digest , conf ) ) { System . out . print ( "* " ) ; System . out . println ( className ) ; } else if ( conf . verbose ) { System . out . print ( "= " ) ; System . out . println ( className ) ; } } catch ( FileNotFoundException e ) { throw new UnexpectedException ( e ) ; } catch ( IOException e ) { System . out . print ( "E " ) ; System . out . println ( className ) ; } } } } } }
Reports classes in the specified directory tree which differ from those on the server or which do not exist on the server .