Пример #1
0
 private function cleanQueueFiltersDir()
 {
     $dirPath = $this->schedulerConfig->getQueueFiltersDir();
     if (!is_dir($dirPath)) {
         return;
     }
     $dh = opendir($dirPath);
     if (!$dh) {
         return;
     }
     while (($file = readdir($dh)) !== false) {
         if ($file == '.' || $file == '..') {
             continue;
         }
         if (!preg_match('/.\\.flt$/', $file)) {
             continue;
         }
         $filePath = "{$dirPath}/{$file}";
         if (filetype($filePath) == 'dir') {
             continue;
         }
         @unlink($filePath);
     }
     closedir($dh);
 }