src/Client.php
public function updateDriveItem($driveItemId, $properties = [], $temp = false)
    {
        $message = sprintf(
            '%s() is deprecated and will be removed in version 3;'
                . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::rename()'
                . ' instead',
            __METHOD__
        );

        @trigger_error($message, E_USER_DEPRECATED);
        $drive = $this->getMyDrive();

        $item = $driveItemId !== null ?
            $this->getDriveItemById($drive->id, $driveItemId)
            : $drive->getRoot();

        $options = (array) $properties;

        if (array_key_exists('name', $options)) {
            $name = $options['name'];
            unset($options['name']);
        } else {
            $name = $item->name;
        }

        $item    = $item->rename($name, $options);
        $options = $this->buildOptions($item, ['parent_id' => $driveItemId]);

        return new Folder($this, $item->id, $options);
    }
public function updateDriveItem($driveItemId, $properties = [], $temp = false)
    {
        $message = sprintf(
            '%s() is deprecated and will be removed in version 3;'
                . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::rename()'
                . ' instead',
            __METHOD__
        );

        @trigger_error($message, E_USER_DEPRECATED);
        $drive = $this->getMyDrive();

        $item = $driveItemId !== null ?
            $this->getDriveItemById($drive->id, $driveItemId)
            : $drive->getRoot();

        $options = (array) $properties;

        if (array_key_exists('name', $options)) {
            $name = $options['name'];
            unset($options['name']);
        } else {
            $name = $item->name;
        }

        $item    = $item->rename($name, $options);
        $options = $this->buildOptions($item, ['parent_id' => $driveItemId]);

        return new Folder($this, $item->id, $options);
    }
public function updateDriveItem ( $ driveItemId , $ properties = [ ] , $ temp = false ) { $ message = sprintf ( '%s() is deprecated and will be removed in version 3;' . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::rename()' . ' instead' , __METHOD__ ) ; @ trigger_error ( $ message , E_USER_DEPRECATED ) ; $ drive = $ this -> getMyDrive ( ) ; $ item = $ driveItemId !== null ? $ this -> getDriveItemById ( $ drive -> id , $ driveItemId ) : $ drive -> getRoot ( ) ; $ options = ( array ) $ properties ; if ( array_key_exists ( 'name' , $ options ) ) { $ name = $ options [ 'name' ] ; unset ( $ options [ 'name' ] ) ; } else { $ name = $ item -> name ; } $ item = $ item -> rename ( $ name , $ options ) ; $ options = $ this -> buildOptions ( $ item , [ 'parent_id' => $ driveItemId ] ) ; return new Folder ( $ this , $ item -> id , $ options ) ; }
Updates the properties of a drive item in the current OneDrive account.

@param string $driveItemId
The unique ID of the drive item to update.
@param array|object $properties
The properties to update. Default: [].
@param bool $temp
Option to allow save to a temporary file in case of large files.

@throws Exception
Thrown on I/O errors.

@deprecated Use Krizalys\Onedrive\Proxy\DriveItemProxy::rename() instead.
Updates the properties of a drive item in the current OneDrive account .