. * */ namespace OC; use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\ICssManager; /** * This class implements methods to access SCSS cached files */ class CssManager implements ICssManager { /** @var IAppData */ private $appData; /** * CssManager constructor. * * @param IAppData $appData */ public function __construct(IAppData $appData) { $this->appData = $appData; } /** * Get the css file and return ISimpleFile * * @param string $fileName css filename with extension * @return ISimpleFile */ public function getCss($fileName) { try { $folder = $this->appData->getFolder('css'); } catch(NotFoundException $e) { throw new NotFoundException(); } try { return $folder->getFile($fileName); } catch(NotFoundException $e) { throw new NotFoundException(); } } }