private List < String > deleteMissingDatabases ( List < String > databases ) { List < String > filesExist = new ArrayList <> ( ) ; for ( String database : databases ) { if ( exists ( database ) ) { filesExist . add ( database ) ; } } return filesExist ; }
Delete all databases that do not exist or the database file does not exist