• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/backup.php
  • Класс: CDirScan
  • Вызов: CDirScan::Scan
function Scan($dir)
{
	$dir = str_replace('\','/',$dir);

	if ($this->Skip($dir))
	{
		// echo $dir."
n"; return; } $this->nextPath = $dir; if (is_dir($dir)) { ############################# # DIR ############################# if (!$this->startPath) // если начальный путь найден или не задан { $r = $this->ProcessDirBefore($dir); if ($r === false) return false; } if (!($handle = opendir($dir))) { $this->err[] = 'Error opening dir: '.$dir; return false; } while (($item = readdir($handle)) !== false) { if ($item == '.' || $item == '..' || false !== mb_strpos($item, '\')) continue; $f = $dir."/".$item; $r = $this->Scan($f); if ($r === false || $r === 'BREAK') { closedir($handle); return $r; } } closedir($handle); if (!$this->startPath) // если начальный путь найден или не задан { if ($this->ProcessDirAfter($dir) === false) return false; $this->DirCount++; } } else { ############################# # FILE ############################# $r = $this->ProcessFile($dir); if ($r === false) return false; elseif ($r === 'BREAK') // если файл обработан частично return $r; $this->FileCount++; } return true; }