• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/file.php
  • Класс: CWebDavFile
  • Вызов: CWebDavFile::__get_files_and_folders
function __get_files_and_folders($path, &$arSection)
		{
			static $io = false;

			if ($io === false)
				$io = CBXVirtualIo::GetInstance();

			if (!is_array($arSection))
				$arSection = array();

			$oDir = $io->GetDirectory($path);
			if ($oDir->IsExists())
			{
				$arSection[] = $path;
				$arChildren = $oDir->GetChildren();
				foreach($arChildren as $node)
				{
					$tmp_path = $node->GetPathWithName();
					$arSection[] = $tmp_path;

					if ($node->IsDirectory())
						__get_files_and_folders($tmp_path, $arSection);
				}
			}
			elseif ($io->FileExists($path))
			{
				$arSection[] = $path;
			}
		}