Moves this drive item.

@param DriveItemProxy $destinationItem
The destination item.
@param array $options
The options.

@return DriveItemProxy
The drive item.
559055
public function move(self $destinationItem, array $options = [])
    {
        $driveLocator = "/drives/{$this->parentReference->driveId}";
        $itemLocator  = "/items/{$this->id}";
        $endpoint     = "$driveLocator$itemLocator";

        $body = [
            'parentReference' => [
                'id' => $destinationItem->id,
            ],
        ];

        $response = $this
            ->graph
            ->createRequest('PATCH', $endpoint)
            ->attachBody($body + $options)
            ->execute();

        $status = $response->getStatus();

        if ($status != 200) {
            throw new \Exception("Unexpected status code produced by 'PATCH $endpoint': $status");
        }

        $driveItem = $response->getResponseAsObject(DriveItem::class);

        return new self($this->graph, $driveItem);
    }
533276
public function moveDirectory( $source, $destination )
    {
        $path = explode( DS, $source );

        $destination = $destination . DS . $path[ count( $path ) - 1 ];

        $result = $this->copyDirectory( $source, $destination, TRUE );

        if ( TRUE === $result )
        {
            $result = $this->deleteDirectory( $source );
        }

        return $result;
    }
396092
def moveListItem(L, fromidx, toidx):
    ""
    r = L.pop(fromidx)
    L.insert(toidx, r)
    return toidx
1298344
public function deserializeQuestion(array $itemData, AbstractItem $item = null, array $options = [])
    {
        return $this->getItemSerializer()->deserialize($itemData, $item, $options);
    }
790613
protected function moveTemporaryFileToFinalDestination($temporaryFile, $finalTargetPathAndFilename)
    {
        if (!file_exists(dirname($finalTargetPathAndFilename))) {
            Files::createDirectoryRecursively(dirname($finalTargetPathAndFilename));
        }
        if (copy($temporaryFile, $finalTargetPathAndFilename) === false) {
            throw new StorageException(sprintf('The temporary file of the file import could not be moved to the final target "%s".', $finalTargetPathAndFilename), 1381156103);
        }
        unlink($temporaryFile);

        $this->fixFilePermissions($finalTargetPathAndFilename);
    }
1251186
public function createSendContext(
        $message,
        SendOptions $options,
        PipelineStageContext $parentContext
    ) {
        return new OutgoingSendContext(
            new OutgoingLogicalMessage($message),
            $options,
            $parentContext instanceof IncomingContext ? $parentContext->getIncomingPhysicalMessage() : null,
            $parentContext instanceof IncomingContext ? $parentContext->getPendingTransportOperations() : null,
            $parentContext
        );
    }
389121
def move(self, source, destination):
        
        if source.isfile():
            source.copy(destination)
            source.remove()
        else:
            source.copy(destination, recursive=True)
            source.remove('r')
378414
public static function copy(string $source, string $destination, array $options = []) : bool {
		if (is_dir($source)) {
			// we need to skip directories
			if (!empty($options['skip_directories']) && in_array(basename($source), $options['skip_directories'])) {
				return true;
			}
			// open directory for reading
			$dir = opendir($source);
			if (!file_exists($destination)) {
				if (!self::mkdir($destination)) return false;
			}
			while (($file = readdir($dir)) !== false) {
				if ($file == '.' || $file == '..') continue;
				if (empty($options['skip_files']) || (!empty($options['skip_files']) && !in_array($file, $options['skip_files']))) {
					if (!self::copy($source . DIRECTORY_SEPARATOR . $file, $destination . DIRECTORY_SEPARATOR . $file, $options)) return false;
				}
			}
			closedir($dir);
			return true;
		} else {
			return copy($source, $destination);
		}
	}
92963
private function removeFilesAndDirectories($destinationDirectory)
    {
        $currentStructure = $this->fileSystem->allFiles($destinationDirectory);

        $removedPaths = [];

        foreach ($currentStructure as $file) {
            /* @var SplFileInfo $file */
            $directoryPath =
                $this->normalizePath($destinationDirectory . DIRECTORY_SEPARATOR . $file->getRelativePath());
            $fullPath      =
                $this->normalizePath($destinationDirectory . DIRECTORY_SEPARATOR . $file->getRelativePathname());

            if ($this->shouldBeRemoved($directoryPath)) {
                $removedPaths[] = $directoryPath;
                $this->fileSystem->deleteDirectory($directoryPath, false);
            }

            if ($this->shouldBeRemoved($fullPath)) {
                $removedPaths[] = $fullPath;
                $this->fileSystem->delete($fullPath);
            }

        }

        return $removedPaths;
    }
882822
public function pfMerge($destinationKey, $sourceKey, ...$sourceKeys) {
        return $this->send(array_merge(['pfmerge', $destinationKey], (array) $sourceKey, $sourceKeys));
    }
77594
public function moveTo(string $destination): void
    {
        $destination = is_dir($destination) ? ("$destination/{$this->clientName}") : $destination;
        Filesystem::checkWritable(dirname($destination));
        if (!move_uploaded_file($this->path, $destination)) {
            throw new FilesystemException("Failed to move file {$this->path} to {$destination}");
        }
    }
274489
private function deserializeItems(OrderingQuestion $question, array $items, array $solutions, array $options = [])
    {
        $itemEntities = $question->getItems()->toArray();

        foreach ($items as $itemData) {
            $item = null;

            // Searches for an existing item entity.
            foreach ($itemEntities as $entityIndex => $entityItem) {
                /** @var OrderingItem $entityItem */
                if ($entityItem->getUuid() === $itemData['id']) {
                    $item = $entityItem;
                    unset($itemEntities[$entityIndex]);
                    break;
                }
            }

            $item = $item ?: new OrderingItem();
            $item->setUuid($itemData['id']);

            // Deserialize item content
            $item = $this->contentSerializer->deserialize($itemData, $item, $options);

            // Set item score feedback and order
            foreach ($solutions as $solution) {
                if ($solution['itemId'] === $itemData['id']) {
                    $item->setScore($solution['score']);

                    if (isset($solution['feedback'])) {
                        $item->setFeedback($solution['feedback']);
                    }

                    if (isset($solution['position'])) {
                        $item->setPosition($solution['position']);
                    }
                    break;
                }
            }

            $question->addItem($item);
        }

        // Remaining items are no longer in the Question
        foreach ($itemEntities as $itemToRemove) {
            $question->removeItem($itemToRemove);
        }
    }
168495
public function deserialize($data, ContentItem $contentItem = null, array $options = [])
    {
        if (empty($contentItem)) {
            $contentItem = new ContentItem();
        }
        $this->sipe('url', 'setData', $data, $contentItem);
        $this->sipe('data', 'setData', $data, $contentItem);

        return $contentItem;
    }
1078178
protected function _move($source, $targetDir, $name) {
		$target = $this->_normpath($targetDir.'/'.$name);
		try {
			$this->dropbox->move($source, $target);
		} catch (Dropbox_Exception $e) {
			return $this->setError('Dropbox error: '.$e->getMessage());
		}
		$this->deltaCheck();
		return $target;
	}
1354797
public function upload($sourceFile, $destinationFile)
    {
        $destination = $this->storagePath.rtrim($destinationFile, '/');
        Service::$log->msg('Filesystem: Copying file to the backup storage location: ' . $sourceFile);
        copy($sourceFile, $destination);
        Service::$log->msg('Filesystem: Copy ended: '.$destination);

        return $destination;
    }
1322846
public function moveFile($fileName, $destinationName){
        return move_uploaded_file($this->getPathBase() . $fileName, $this->getPathBase() . $destinationName);
    }
1172731
public function dragTo(ElementInterface $destination)
    {
        $this->getDriver()->dragTo($this->getXpath(), $destination->getXpath());
    }