private function getTemplateDirectory()
    {
        $templateDirectory = realpath($this->templateDirectory . '/_template');

        if ($this->files->exists($templateDirectory) && $this->files->isDirectory($templateDirectory)) {
            $this->generator->setInsideTemplateDirectory(true);

            return $templateDirectory;
        }

        return $this->templateDirectory;
    }