Create the `assets_dir` if needed

@return self
184493
protected function initializeAssetsDir()
    {
        $this->filesystem->ensureDirectoryExists($this->assets_dir);
        $this->assets_dir = realpath($this->assets_dir);
        return $this;
    }
780471
public function getAssetDirectory()
    {
        $mergedFileDirectory = StaticContainer::get('path.tmp') . '/assets';

        if (!is_dir($mergedFileDirectory)) {
            Filesystem::mkdir($mergedFileDirectory);
        }

        if (!is_writable($mergedFileDirectory)) {
            throw new Exception("Directory " . $mergedFileDirectory . " has to be writable.");
        }

        return $mergedFileDirectory;
    }
1082216
public function setAssetsDirectory($path)
    {
        $realpath = $this->getFullPath($path, null, true);
        if (@file_exists($realpath) && is_dir($realpath)) {
            $this->_assets_dir = $path;
        } else {
            throw new InvalidArgumentException(
                sprintf('Assets directory "%s" not found !', $path)
            );
        }
        return $this;
    }
908625
public function addAssets()
    {
        if ($this->enabled()) {

            // Only add assets if Page is HTML
            $page = $this->grav['page'];
            if ($page->templateFormat() !== 'html') {
                return $this;
            }

            /** @var Assets $assets */
            $assets = $this->grav['assets'];

            // Add jquery library
            $assets->add('jquery', 101);

            $this->renderer = $this->debugbar->getJavascriptRenderer();
            $this->renderer->setIncludeVendors(false);

            // Get the required CSS files
            list($css_files, $js_files) = $this->renderer->getAssets(null, JavascriptRenderer::RELATIVE_URL);
            foreach ((array)$css_files as $css) {
                $assets->addCss($css);
            }

            $assets->addCss('/system/assets/debugger.css');

            foreach ((array)$js_files as $js) {
                $assets->addJs($js);
            }
        }

        return $this;
    }
425444
public function getAssetsFolderDirName()
    {
        if ($this->owner->getField('AssetsFolderID') != 0) {
            $dirObj = $this->owner->AssetsFolder();
            $dirName = str_replace('assets/', '', $dirObj->Filename);

            return $dirName;
        }
    }
1112849
public function requireEditorAssets()
    {
        $this->assets->requireAsset('core/file-manager');
        $this->assets->requireAsset('editor/ckeditor4');

        $plugins = $this->pluginManager->getSelectedPluginObjects();

        foreach ($plugins as $plugin) {
            /** @var Plugin $plugin */
            $group = $plugin->getRequiredAssets();
            $this->assets->requireAsset($group);
        }
    }
57988
protected function createDocPropsFolderAndFiles()
    {
        $this->docPropsFolder = $this->createFolder($this->rootFolder, self::DOC_PROPS_FOLDER_NAME);

        $this->createAppXmlFile();
        $this->createCoreXmlFile();

        return $this;
    }
1228694
protected function createDirectories()
    {
        if (! is_dir(resource_path('views/layouts'))) {
            mkdir(resource_path('views/layouts'), 0755, true);
        }

        if (! is_dir(resource_path('views/auth/passwords'))) {
            mkdir(resource_path('views/auth/passwords'), 0755, true);
        }
    }
393988
public function prepareAssets($assets_directory, \Smarty_Internal_Template $smarty)
    {
        // Be sure to use the proper path separator
        if (DS != '/') {
            $assets_directory = str_replace('/', DS, $assets_directory);
        }

        // Set the current template assets directory
        self::$assetsDirectory = $assets_directory;

        /** @var SmartyParser $smartyParser */
        $smartyParser = $smarty->smarty;

        $this->prepareTemplateAssets($smartyParser->getTemplateDefinition(), $assets_directory, $smartyParser);
    }
711265
private function releaseAssets()
    {
        $assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $dirs = \Yii::$app->assetManager->publish($assetDir, [
            'forceCopy' => YII_DEBUG
        ]);
        return BaseUrl::base(true) . $dirs[1] .'/';
    }
618861
public function includeDefaultCssFiles()
    {
        foreach ($this->cssFiles as $file) {
            $filePath = StringService::get()->getExtensionRelativePath('Resources/Public/StyleSheets/' . $file);

            $this->assetHandlerConnectorManager
                ->getPageRenderer()
                ->addCssFile($filePath);
        }

        return $this;
    }
1232710
def createBlendedFolders():
    """"""
    # Create the templates folder
    create_folder(os.path.join(cwd, "templates"))

    # Create the templates/assets folder
    create_folder(os.path.join(cwd, "templates", "assets"))

    # Create the templates/assets/css folder
    create_folder(os.path.join(cwd, "templates", "assets", "css"))

    # Create the templates/assets/js folder
    create_folder(os.path.join(cwd, "templates", "assets", "js"))

    # Create the templates/assets/img folder
    create_folder(os.path.join(cwd, "templates", "assets", "img"))

    # Create the content folder
    create_folder(os.path.join(cwd, "content"))
67650
public function setAssets($assets): self
    {
        if (is_array($assets)) {
            $assets = new \ArrayIterator($assets);
        }
        if (!$assets instanceof \Traversable) {
            throw new \InvalidArgumentException('Assets must be an iterable array or object.');
        }
        $this->assets = $assets;

        return $this;
    }
623478
public function set_assets() {
		if ( ! empty( $this->struct['style'] ) ) {
			$this->assets['style'] = array_merge( $this->assets['style'], $this->struct['style'] );
		}
		if ( ! empty( $this->struct['script'] ) ) {
			$this->assets['script'] = array_merge( $this->assets['script'], $this->struct['script'] );
		}
	}
120088
public function setTargetdir()
	{
		//set the target dir
		$this->target_dir =  Path::base() . $this->upload_path;

		//check if the directory exists and create if not
		if( ! file_exists($this->target_dir)) mkdir($this->target_dir);

		return $this;

	}
1219370
protected function createDirectories()
    {
        if (! is_dir($directory = resource_path('views/layouts'))) {
            mkdir($directory, 0755, true);
        }
        if (! is_dir($directory = resource_path('views/auth'))) {
            mkdir($directory, 0755, true);
        }
        if (! is_dir($directory = resource_path('views/partials'))) {
            mkdir($directory, 0755, true);
        }
    }
738704
private function processAssets()
    {
        $js = $this->assetmanager->getAssetHandler('js');

        $afh = new \Core\Asset\AssetFileHandler();
        $afh->setFilename($this->config->get('Core', 'dir.cache') . '/script.js');
        $afh->setTTL($this->config->get('Core', 'cache.ttl.js'));

        $js->setFileHandler($afh);

        $css = $this->assetmanager->getAssetHandler('css');

        $theme = $this->config->get('Core', 'style.theme.name');

        $css->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../fonts/', '../Themes/' . $theme . '/fonts/'));
        $css->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../img/', '../Themes/' . $theme . '/img/'));

        $afh = new \Core\Asset\AssetFileHandler();
        $afh->setFilename($this->config->get('Core', 'dir.cache') . '/style.css');
        $afh->setTTL($this->config->get('Core', 'cache.ttl.css'));

        $css->setFileHandler($afh);

        foreach ($this->apps as $app) {
            foreach ($app->javascript as $aio) {
                $js->addObject($aio);
            }

            foreach ($app->css as $aio) {
                $css->addObject($aio);
            }
        }

        // Process assets
        $this->assetmanager->process();
    }