private void addExternalDatabases ( Collection < String > databases ) { // Get the external GeoPackages, adding those where the file exists and // deleting those with missing files List < GeoPackageMetadata > externalGeoPackages = getExternalGeoPackages ( ) ; for ( GeoPackageMetadata external : externalGeoPackages ) { if ( new File ( external . getExternalPath ( ) ) . exists ( ) ) { databases . add ( external . getName ( ) ) ; } else { delete ( external . getName ( ) ) ; } } }
Add all external databases to the collection