private function findHashOf(FileIDHelper $helper, ParsedFileID $parsedFileID, Filesystem $filesystem)
    {
        // Re build the file ID but without the variant
        $fileID = $helper->buildFileID(
            $parsedFileID->getFilename(),
            $parsedFileID->getHash()
        );

        // Couldn't find the original file, let's bail.
        if (!$filesystem->has($fileID)) {
            return false;
        }

        // Get hash from stream
        $stream = $filesystem->readStream($fileID);
        $hc = hash_init('sha1');
        hash_update_stream($hc, $stream);
        $fullHash = hash_final($hc);

        return $fullHash;
    }
private function findHashOf(FileIDHelper $helper, ParsedFileID $parsedFileID, Filesystem $filesystem)
    {
        // Re build the file ID but without the variant
        $fileID = $helper->buildFileID(
            $parsedFileID->getFilename(),
            $parsedFileID->getHash()
        );

        // Couldn't find the original file, let's bail.
        if (!$filesystem->has($fileID)) {
            return false;
        }

        // Get hash from stream
        $stream = $filesystem->readStream($fileID);
        $hc = hash_init('sha1');
        hash_update_stream($hc, $stream);
        $fullHash = hash_final($hc);

        return $fullHash;
    }
private function findHashOf ( FileIDHelper $ helper , ParsedFileID $ parsedFileID , Filesystem $ filesystem ) { // Re build the file ID but without the variant $ fileID = $ helper -> buildFileID ( $ parsedFileID -> getFilename ( ) , $ parsedFileID -> getHash ( ) ) ; // Couldn't find the original file, let's bail. if ( ! $ filesystem -> has ( $ fileID ) ) { return false ; } // Get hash from stream $ stream = $ filesystem -> readStream ( $ fileID ) ; $ hc = hash_init ( 'sha1' ) ; hash_update_stream ( $ hc , $ stream ) ; $ fullHash = hash_final ( $ hc ) ; return $ fullHash ; }
Get the full hash for the provided Parsed File ID,
@param FileIDHelper $helper
@param ParsedFileID $parsedFileID
@param Filesystem $filesystem
@return bool|string
Get the full hash for the provided Parsed File ID