FOF30\Utils\FilesCheck::fastCheck PHP Method

fastCheck() public method

Performs a fast check of file and folders. If even one of the files/folders doesn't exist, or even one file has the wrong file size it will return false.
public fastCheck ( ) : boolean
return boolean False when there are mismatched files and directories
    public function fastCheck()
    {
        // Check that all directories exist
        foreach ($this->dirList as $directory) {
            $directory = JPATH_ROOT . '/' . $directory;
            if (!@is_dir($directory)) {
                return false;
            }
        }
        // Check that all files exist and have the right size
        foreach ($this->fileList as $filePath => $fileData) {
            $filePath = JPATH_ROOT . '/' . $filePath;
            if (!@file_exists($filePath)) {
                return false;
            }
            $fileSize = @filesize($filePath);
            if ($fileSize != $fileData[0]) {
                return false;
            }
        }
        return true;
    }