/**
  * Stores given mountpoint descriptor.
  * 
  * @param MountpointDescriptor $md
  */
 public function storeMountpointDescriptor(MountpointDescriptor $md)
 {
     $xml = $this->loadMountpointsFile();
     // check for already existing descriptor (update)
     $updateDone = false;
     foreach ($xml->children() as $mdData) {
         if ((string) $mdData['mountpoint'] == $md->getMountpointPath()) {
             $mdData['target'] = $md->getTargetPath();
             $mdData['active'] = $mdData->getIsActive();
             $updateDone = true;
         }
     }
     if (!$updateDone) {
         // add new descriptor
         $node = $xml->addChild('mountpoint');
         $node->addAttribute('mountpoint', $md->getMountpointPath());
         $node->addAttribute('target', $md->getTargetPath());
         $node->addAttribute('active', $md->getIsActive());
     }
     $this->saveMountpointsFile($xml);
 }
 /**
  * @param MountpointDescriptor $md
  */
 public function saveMountpointDescriptor(MountpointDescriptor $md)
 {
     $manager = self::getMountpointManagerInstance($md->getMountpointPath());
     $manager->saveMountpointDescriptor($md);
 }