Codesleeve\AssetPipeline\Commands\AssetsCleanCommand::removeAssetCache PHP Method

removeAssetCache() protected method

Removes the AssetCache for this file
protected removeAssetCache ( [type] $file, [type] $recursive ) : [type]
$file [type]
$recursive [type]
return [type]
    protected function removeAssetCache($file, $recursive)
    {
        $files = $this->asset->isJavascript($file) ? $this->asset->getParser()->javascriptFiles($file) : $this->asset->getParser()->stylesheetFiles($file);
        array_push($files, $this->asset->getParser()->absoluteFilePath($file));
        foreach ($files as $file) {
            $removed = $this->asset->getGenerator()->cachedFile($file)->remove();
            if ($removed === false) {
                $this->writeln(PHP_EOL . "<warning> failed to find/remove cache for {$file}</warning>");
            }
        }
    }