public function workgroupDeleted(UMEvent $e)
 {
     if ($e->getSource() instanceof AbstractEyeosWorkgroup) {
         $workgroupDirPath = UMManager::getEyeosWorkgroupDirectory($e->getSource()->getName());
         AdvancedPathLib::rmdirs($workgroupDirPath);
     }
 }
 protected function getWorkgroupSettingsPath(EyeosWorkgroup $workgroup)
 {
     $path = UMManager::getEyeosWorkgroupDirectory($workgroup) . '/' . WORKGROUPS_CONF_DIR . '/' . WORKGROUPS_META_DIR . '/' . WORKGROUPS_META_SETTINGS_FILENAME;
     if (!is_dir(dirname($path))) {
         mkdir(dirname($path), 0777, true);
     }
     return $path;
 }
 /**
  * @param string $path
  * @param SimpleXMLElement $xmlConf
  * @return AbstractFile
  */
 public static function getRealFile($path, $xmlParams = null, $params = null)
 {
     $urlParts = EyeosAbstractVirtualFile::parse_url($path, AdvancedPathLib::OS_UNIX);
     if (!isset($urlParts['principalname'])) {
         //throw new EyeInvalidArgumentException('Missing workgroup name in given path "' . $path . '".');
         return null;
     }
     $workgroupFilesPath = UMManager::getEyeosWorkgroupDirectory($urlParts['principalname']) . '/' . WORKGROUPS_FILES_DIR;
     if (!is_dir($workgroupFilesPath)) {
         try {
             if (!mkdir($workgroupFilesPath, 0777, true)) {
                 throw new EyeIOException('Unable to create workgroup files directory ' . $workgroupFilesPath);
             }
         } catch (EyeErrorException $e) {
             throw new EyeIOException('Unable to create workgroup files directory ' . $workgroupFilesPath . '.', 0, $e);
         }
     }
     return new LocalFile($workgroupFilesPath . $urlParts['path'], $params);
 }
 protected function getWorkgroupMetaFilesPath($wgname)
 {
     $path = UMManager::getEyeosWorkgroupDirectory($wgname) . '/' . WORKGROUPS_METAFILES_DIR;
     if (!is_dir($path)) {
         mkdir($path, 0777, true);
     }
     return $path;
 }