• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/virtual_io_filesystem.php
  • Класс: CBXVirtualDirectoryFileSystem
  • Вызов: CBXVirtualDirectoryFileSystem::GetChildren
public function GetChildren()
{
	$arResult = array();

	if (!$this->IsExists())
		return $arResult;

	if ($handle = opendir($this->GetPathWithNameEncoded()))
	{
		while (($file = readdir($handle)) !== false)
		{
			if ($file == "." || $file == "..")
				continue;

			$pathDecoded = CBXVirtualIoFileSystem::ConvertCharset($this->GetPathWithNameEncoded()."/".$file, CBXVirtualIoFileSystem::directionDecode);
			if (is_dir($this->GetPathWithNameEncoded()."/".$file))
				$arResult[] = new CBXVirtualDirectoryFileSystem($pathDecoded);
			else
				$arResult[] = new CBXVirtualFileFileSystem($pathDecoded);
		}
		closedir($handle);
	}

	return $arResult;
}