@param string $file
@param string $hash

@return void
512953
private function processFileFromFilesystem($file, $hash)
    {
        $hashFromCache = $this->cache->read($file);

        if ($hashFromCache) {
            if ($hash != $hashFromCache) {
                $this->cache->write($file, $hash);
                $this->updatedFiles[] = $file;
            }
        } else {
            $this->cache->write($file, $hash);
            $this->newFiles[] = $file;
        }
    }
1162890
public static void writeHash(File file, HashType hashType) throws IOException {
    SparkeyWriter writer = append(file);
    writer.writeHash(hashType);
    writer.close();
  }
247842
public function delete(string $namespace, string $hash): void
    {
        $fileName = $this->getFileName($namespace, $hash);
        if (file_exists($fileName)) {
            unlink($fileName);
        }
    }
1000445
public function writePoFile(string $file): void
    {
        $source = $this->dumpString();
        $testName = file_exists($file) ? $file : dirname($file);
        $status = is_writable($testName);
        if ($status === true) {
            $status = file_put_contents($file, $source);
        }
        if (false === $status) {
            throw new FileNotWritableException($file);
        }
    }
888943
protected static function setFile($file)
    {
        if (self::$isCom === false) {
            $incFile = route()->views.'/'.$file.'.php';
            if (file_exists($incFile)) {
                self::$file = $incFile;
            }
        } else {
            $incFile = route()->com.$file.'.php';
            if (file_exists($incFile)) {
                self::$file = $incFile;
            }
        }
    }
948036
public function load($file)
    {
        $loader = new PhpConfig();
        $templates = $loader->read($file);
        $this->add($templates);
    }
1030155
public function setKey($key)
    {
        $this->hash = null;

        if (empty($key)) {
            $this->key = null;
            return;
        }

        $this->key = (string) $key;
        $this->hash = $this->makeHash($key);
    }
354466
public function load($file)
	{
		$details = pathinfo($file);
		$this->filename = $details['basename'];
		$this->extension = $details['extension'];
		$this->directory = $details['dirname'];
	}
981826
protected function _addDependency(string $file): void
    {
        $file = str_replace('\\', '/', $file);
        if (!in_array($file, $this->_dependencies)) {
            $this->_dependencies[] = $file;
        }
    }
151568
protected function addFile(File $file) {
        $files = $this->getFiles();
        $files[$file->getName()] = $file;
        $this->setFiles($files);
    }
354035
public function store($hash, $data)
    {
        $modified = file_exists($hash) ? filemtime($hash) : 0;
        if ($modified) {
            $this->updateRegistry();
            $md5hash = HashHandler::getInstance()->calculate($hash);
            if (isset($this->storage[$md5hash])) {
                $oldFileName = $md5hash . '_' . $this->storage[$md5hash] . '.php';
                if (file_exists($this->saveDirPath . '/' . $oldFileName)) {
                    unlink($this->saveDirPath . '/' . $oldFileName);
                }
            }
            $newFileName = $md5hash . '_' . $modified . '.php';
            if ($f = fopen($this->saveDirPath . '/' . $newFileName, 'w')) {
                fputs($f, '<?php return ' . var_export($data, true) . ';');
                fclose($f);
                $this->storage[$md5hash] = $modified;
            } else {
                throw new \Exception('Can not write to config cache directory');
            }
            $this->dumpRegistry();
        }
    }
141837
public function renderRestorePassword(string $hash): void
	{
		$session = $this->getSession('cms/restorePassword');
		if (!isset($session->$hash)) {
			$this->redirect(":{$this->module}:Sign:in");
		} else {
			$this['restorePasswordForm']->setDefaults([
				'hash' => $hash
			]);
		}
	}
821867
public function removeLoaderByFile($file)
    {
        foreach ($this->loaders as $i => $loader) {
            /** @var LoaderInterface $loader */
            if ($loader->supports($file)) {
                unset($this->loaders[$i]);
            }
        }
    }
573588
public function setHash($hash)
    {
        if (!preg_match("/[0-9a-f]{32}/", $hash)) {
            throw new InvalidArgumentException("Asset cache buster hash must be a valid md5 hash.");
        }
        $hash = trim($hash, '/');

        $this->hash = $hash;
    }
448708
protected function touchFile($file)
    {
        passthru('touch '.$file, $error);
        if ($error !== 0) {
            $this->output->writeln('<error>Error creating file '.$file.'</error>');
        } else {
            $this->output->writeln('<info>File '.$file.' created successfully</info>');
        }
    }
499078
public function import($file)
    {
        $data = $this->yaml->load($file);
        parent::import($data);
    }
630659
public function setFile($file) {
        $f = $file;
        if (preg_match('#^compress\.(.*)://(.*)#', $file, $r)) {
            $f = $r[2];
        }
        if(is_readable($f)) {
            $open = fopen($file, "rb");
            $this->file = $open;
        } else {
            $this->handleError("{$file} is not readable.");
        }

	}