• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/io/directory.php
  • Класс: BitrixMainIODirectory
  • Вызов: Directory::createSubdirectory
public function createSubdirectory($name)
{
	$dir = new Directory(Path::combine($this->path, $name));
	if (!$dir->isExists())
	{
		try
		{
			mkdir($dir->getPhysicalPath(), BX_DIR_PERMISSIONS, true);
		}
		catch (ErrorException $exception)
		{
			if (!$dir->isExists())
			{
				throw $exception;
			}
		}
	}

	return $dir;
}