public function copy($from, $to, $fromCopyRef = null)
    {
        $call = 'fileops/copy';
        $params = array(
            'root' => $this->root,
            'from_path' => $this->normalisePath($from),
            'to_path' => $this->normalisePath($to),
        );
        
        if ($fromCopyRef) {
            $params['from_path'] = null;
            $params['from_copy_ref'] = $fromCopyRef;
        }
        
        $response = $this->fetch('POST', self::API_URL, $call, $params);
        return $response;
    }
public function copy($from, $to, $fromCopyRef = null)
    {
        $call = 'fileops/copy';
        $params = array(
            'root' => $this->root,
            'from_path' => $this->normalisePath($from),
            'to_path' => $this->normalisePath($to),
        );
        
        if ($fromCopyRef) {
            $params['from_path'] = null;
            $params['from_copy_ref'] = $fromCopyRef;
        }
        
        $response = $this->fetch('POST', self::API_URL, $call, $params);
        return $response;
    }
public function copy ( $ from , $ to , $ fromCopyRef = null ) { $ call = 'fileops/copy' ; $ params = array ( 'root' => $ this -> root , 'from_path' => $ this -> normalisePath ( $ from ) , 'to_path' => $ this -> normalisePath ( $ to ) , ) ; if ( $ fromCopyRef ) { $ params [ 'from_path' ] = null ; $ params [ 'from_copy_ref' ] = $ fromCopyRef ; } $ response = $ this -> fetch ( 'POST' , self :: API_URL , $ call , $ params ) ; return $ response ; }
Copies a file or folder to a new location
@param string $from File or folder to be copied, relative to root
@param string $to Destination path, relative to root
@param null|string $fromCopyRef Must be used instead of the from_path
@return object stdClass
Copies a file or folder to a new location