]> git.openstreetmap.org Git - nominatim.git/blob - lib/setup_functions.php
5aa5919b2e63ec5f768c19d24033796b3441ebb8
[nominatim.git] / lib / setup_functions.php
1 <?php
2
3 function checkInFile($sOSMFile)
4 {
5     if (!isset($sOSMFile)) {
6         fail('missing --osm-file for data import');
7     }
8
9     if (!file_exists($sOSMFile)) {
10         fail('the path supplied to --osm-file does not exist');
11     }
12
13     if (!is_readable($sOSMFile)) {
14         fail('osm-file "' . $aCMDResult['osm-file'] . '" not readable');
15     }
16 }