public boolean isLibraryUpToDate ( String name ) { Optional < Path > libInst = findLibraryInstall ( name ) ; if ( ! libInst . isPresent ( ) ) return false ; // can we even find it on the system. try { VersionInfo srcVer = getVersionOfLibrary ( name , true ) ; VersionInfo dstVer = getVersionOfLibrary ( name , false ) ; return dstVer . isSameOrNewerThan ( srcVer ) ; } catch ( IOException e ) { return false ; // Library is somehow not good. Certainly not the same! } }
Check if the named library is the same version or new than the packaged version