- path_str = dir + "\\*.*";
-
- if ( ( hfile = _findfirst( path.c_str(), &de ) ) == -1 ) {
- SG_LOG(SG_ATC, SG_WARN, "cannot open directory " << dir);
- } else {
- // load all .taxi files
- do {
- file = de.name;
- pos = file.find(".");
- ext = file.substr(pos + 1);
- if(ext == "taxi") {
- f_ident = file.substr(0, pos);
- FGAirport a;
- if(dclFindAirportID(f_ident, &a)) {
- SGBucket sgb(a.longitude, a.latitude);
- int idx = sgb.gen_index();
- if(facilities.find(idx) != facilities.end()) {
- facilities[idx]->push_back(f_ident);
- } else {
- ID_list_type* apts = new ID_list_type;
- apts->push_back(f_ident);
- facilities[idx] = apts;
- }
- SG_LOG(SG_ATC, SG_BULK, "Mapping " << f_ident << " to bucket " << idx);
- }
- }
- } while ( _findnext( hfile, &de ) == 0 );
- }
-#else
-
- DIR *d;
- struct dirent *de;
-
- if ( (d = opendir( dir.c_str() )) == NULL ) {