Contao\Folder::getHash PHP Method

getHash() protected method

Return the MD5 hash of the folder
protected getHash ( ) : string
return string The MD5 has
    protected function getHash()
    {
        $arrFiles = array();
        /** @var \SplFileInfo[] $it */
        $it = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(TL_ROOT . '/' . $this->strFolder, \FilesystemIterator::UNIX_PATHS | \FilesystemIterator::FOLLOW_SYMLINKS | \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST);
        foreach ($it as $i) {
            if (strncmp($i->getFilename(), '.', 1) !== 0) {
                $arrFiles[] = str_replace(TL_ROOT . '/' . $this->strFolder . '/', '', $i->getPathname());
            }
        }
        return md5(implode('-', $arrFiles));
    }