VCR\Util\StreamProcessor::rename PHP Method

rename() public method

Renames a file or directory.
public rename ( string $path_from, string $path_to ) : boolean
$path_from string The URL to the current file.
$path_to string The URL which the path_from should be renamed to.
return boolean Returns TRUE on success or FALSE on failure.
    public function rename($path_from, $path_to)
    {
        $this->restore();
        if (isset($this->context)) {
            $result = rename($path_from, $path_to, $this->context);
        } else {
            $result = rename($path_from, $path_to);
        }
        $this->intercept();
        return $result;
    }