/** @return DirItem */ private function makeTmpDirItem() { $path = DirManager::uploads()->cdToHashFolder()->absDirPath(); $tmpFilePath = tempnam($path, 'upload_'); check_condition($tmpFilePath, 'Не удаётся создать временный файл'); return DirItem::inst($tmpFilePath); }