src/CloudinaryAdapter.php
public function rename($path, $newpath)
    {
        $pathinfo = pathinfo($path);
        if ($pathinfo['dirname'] != '.') {
            $path_remote = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
        } else {
            $path_remote = $pathinfo['filename'];
        }

        $newpathinfo = pathinfo($newpath);
        if ($newpathinfo['dirname'] != '.') {
            $newpath_remote = $newpathinfo['dirname'] . '/' . $newpathinfo['filename'];
        } else {
            $newpath_remote = $newpathinfo['filename'];
        }

        $result = Uploader::rename($path_remote, $newpath_remote);

        return $result['public_id'] == $newpathinfo['filename'];
    }
public function rename($path, $newpath)
    {
        $pathinfo = pathinfo($path);
        if ($pathinfo['dirname'] != '.') {
            $path_remote = $pathinfo['dirname'] . '/' . $pathinfo['filename'];
        } else {
            $path_remote = $pathinfo['filename'];
        }

        $newpathinfo = pathinfo($newpath);
        if ($newpathinfo['dirname'] != '.') {
            $newpath_remote = $newpathinfo['dirname'] . '/' . $newpathinfo['filename'];
        } else {
            $newpath_remote = $newpathinfo['filename'];
        }

        $result = Uploader::rename($path_remote, $newpath_remote);

        return $result['public_id'] == $newpathinfo['filename'];
    }
public function rename ( $ path , $ newpath ) { $ pathinfo = pathinfo ( $ path ) ; if ( $ pathinfo [ 'dirname' ] != '.' ) { $ path_remote = $ pathinfo [ 'dirname' ] . '/' . $ pathinfo [ 'filename' ] ; } else { $ path_remote = $ pathinfo [ 'filename' ] ; } $ newpathinfo = pathinfo ( $ newpath ) ; if ( $ newpathinfo [ 'dirname' ] != '.' ) { $ newpath_remote = $ newpathinfo [ 'dirname' ] . '/' . $ newpathinfo [ 'filename' ] ; } else { $ newpath_remote = $ newpathinfo [ 'filename' ] ; } $ result = Uploader :: rename ( $ path_remote , $ newpath_remote ) ; return $ result [ 'public_id' ] == $ newpathinfo [ 'filename' ] ; }
Rename a file.
Paths without extensions.

@param string $path
@param string $newpath

@return bool
Rename a file . Paths without extensions .