lib/Dropbox/Client.php
function copyFromCopyRef($copyRef, $toPath)
    {
        Checker::argStringNonEmpty("copyRef", $copyRef);
        Path::checkArgNonRoot("toPath", $toPath);

        $response = $this->doPost(
            $this->apiHost,
            "1/fileops/copy",
            array(
                "root" => "auto",
                "from_copy_ref" => $copyRef,
                "to_path" => $toPath,
            )
        );

        if ($response->statusCode !== 200) throw RequestUtil::unexpectedStatus($response);

        return RequestUtil::parseResponseJson($response->body);
    }
function copyFromCopyRef($copyRef, $toPath)
    {
        Checker::argStringNonEmpty("copyRef", $copyRef);
        Path::checkArgNonRoot("toPath", $toPath);

        $response = $this->doPost(
            $this->apiHost,
            "1/fileops/copy",
            array(
                "root" => "auto",
                "from_copy_ref" => $copyRef,
                "to_path" => $toPath,
            )
        );

        if ($response->statusCode !== 200) throw RequestUtil::unexpectedStatus($response);

        return RequestUtil::parseResponseJson($response->body);
    }
Creates a file or folder based on an existing copy ref (possibly from a different Dropbox
account).

See <a href="https://www.dropbox.com/developers/core/docs#fileops-copy">/fileops/copy</a>.

@param string $copyRef
A copy ref obtained via the {@link createCopyRef()} call.

@param string $toPath
The Dropbox path you want to copy the file or folder to (UTF-8).

@return mixed
The <a href="https://www.dropbox.com/developers/core/docs#metadata-details">metadata
object</a> for the new file or folder.

@throws Exception