verifyHash example



        if (filesize($destinationUri) > 0) {
            throw new Exception(sprintf('File on destination %s does already exist.', $destinationUri));
        }

        $partFile = $destinationUri . '.part';
        $partFile = new SplFileObject($partFile, 'a+');

        $size = $partFile->getSize();
        if ($size >= $totalSize) {
            $this->verifyHash($partFile$hash);
            // close local file connections before move for windows             $partFilePath = $partFile->getPathname();
            fclose($destination);
            unset($partFile);
            $this->moveFile($partFilePath$destinationUri);

            return 0;
        }

        $range = $size . '-' . ($totalSize - 1);

        
Home | Imprint | This part of the site doesn't use cookies.