<?php
// return a space delimited string containing names of available instrments
// (the instrumentDescriptor.xml files)

require("phpVars.php");
// find all .xml files in instruments_dir

$dir=opendir($instruments_dir);
$dlist='';
while (!($filename= readdir($dir)) === FALSE) {
  if (!is_dir($instruments_dir . $filename)) {
     $apath=pathinfo($filename);
     $aext=$apath['extension'];
     if (strtoupper($aext)=='XML') {
//       $dlist=$dlist.' '.$apath['filename'];
       $dlist=$dlist.' '.$filename;

     }
  }
}
closedir($dir);
header("Content-Type: text/plain");
print $dlist ;
?>