private boolean ensureAntScriptFileIsValid ( File antScriptFile ) { if ( antScriptFile . exists ( ) && antScriptFile . isDirectory ( ) && fAntScriptNamesCombo . getText ( ) . length ( ) > 0 ) { setErrorMessage ( FatJarPackagerMessages . FatJarPackageWizardPage_error_antScriptLocationIsDir ) ; fAntScriptNamesCombo . setFocus ( ) ; return false ; } if ( antScriptFile . exists ( ) ) { if ( ! antScriptFile . canWrite ( ) ) { setErrorMessage ( FatJarPackagerMessages . FatJarPackageWizardPage_error_antScriptLocationUnwritable ) ; fAntScriptNamesCombo . setFocus ( ) ; return false ; } } return true ; }
Returns a boolean indicating whether the passed File handle is is valid and available for use .