Moves the entity

@param   string  $to  Where to move the entity
@return  bool
19163
public function move($to)
	{
		$dest   = $to . '/' . $this->getDisplayName() . '.' . $this->getExtension();
		$return = $this->hasAdapterOrFail()->adapter->rename($this->getPath(), $dest);

		// Update the internal path
		if ($return)
		{
			$this->path = $dest;
		}

		return $return;
	}
1359539
public static function redirect(string $to) {
		ref\sanitize::url($to);

		unset($_POST);
		unset($_GET);
		unset($_REQUEST);

		if (! \headers_sent()) {
			\header("Location: $to");
		}
		else {
			echo "<script>top.location.href='" . \str_replace("'", "\'", $to) . "';</script>";
		}
		exit;
	}
1168682
public function moveElement($from, $to): self
    {
        $array = $this->getArray();

        if (\is_int($from)) {
            $tmp = \array_splice($array, $from, 1);
            \array_splice($array, (int) $to, 0, $tmp);
            $output = $array;
        } elseif (\is_string($from)) {
            $indexToMove = \array_search($from, \array_keys($array), true);
            $itemToMove = $array[$from];
            if ($indexToMove !== false) {
                \array_splice($array, $indexToMove, 1);
            }
            $i = 0;
            $output = [];
            foreach ($array as $key => $item) {
                if ($i === $to) {
                    $output[$from] = $itemToMove;
                }
                $output[$key] = $item;
                ++$i;
            }
        } else {
            $output = [];
        }

        return static::create(
            $output,
            $this->iteratorClass,
            false
        );
    }
783693
public function to($to)
    {
        $root    = $this->root();
        $to      = trim($to, '/');
        $pattern = trim("{$root}/{$to}", '/');

        return $pattern !== '/' ? $pattern : '';
    }
1143355
public function moveBefore($entity)
    {
        if ($this->parent_id == $entity->parent_id) {
            $this->position = $entity->position - 1;
            $this->save();
        } else {
            $this->moveTo($entity->position - 1, $entity->parent_id);
        }
    }
125546
public static function move(string $path, string $to, bool $symlink = false):int
    {
        try {
            if ($symlink != false) {
                symlink($path, $to);
            } else {
                rename($path, $to);
            }
        } catch (\Exception $exception) {
            throw new \Exception("Server Error : Cannot move $path to $to => ".$exception);
        }

        return (1);
    }
1152897
public function move(int $from, int $to)
    {
        $value = $this->list[$from];

        unset($this->list[$from]);

        array_splice($this->list, $to, 0, $value);
    }
433051
public function move( $source, $destination ) {

		if ( false === $this->copy( $source, $destination ) ) {
			return false;
		}

		$this->delete( $source );

		return true;
	}
593048
public function removeChildren($from, $to = null, $forceDelete = false)
    {
        if (!is_numeric($from) || (!is_null($to) && !is_numeric($to))) {
            throw new \InvalidArgumentException('`from` and `to` are the position boundaries. They must be of type int.');
        }

        if ($this->exists) {
            $action = ($forceDelete === true ? 'forceDelete' : 'delete');

            $this->children([$from, $to])->$action();
        }

        return $this;
    }
1043582
public function move($path_from, $path_to)
    {
        return $this->exists($path_from) ? rename($path_from, $path_to) : false;
    }
969399
protected function moveUploadedFile($from, $to)
    {
        return $this->unitTest ? copy($from, $to) : @move_uploaded_file($from, $to);
    }
365906
public function move($from, $to)
    {
        $this->clearAll();

        $from = trim($from);
        if (!$this->validatePath($from)) {
            throw new \InvalidArgumentException('Invalid source path');
        }

        $to = trim($to);
        if (!$this->validatePath($to)) {
            throw new \InvalidArgumentException('Invalid destination path');
        }

        $this->addCommandName(self::GIT_MOVE);
        $this->addCommandSubject($from);
        $this->addCommandSubject2($to);

        return $this->getCommand();
    }
1010463
public function move($toFile)
    {
        if ($this->error == UPLOAD_ERR_OK) {
            return move_uploaded_file($this->tmpName, $toFile);
        } else {
            return false;
        }
    }
976300
protected function publishDirectory($from, $to)
    {
        $this->moveManagedFiles(new MountManager([
            'from' => new Flysystem(new LocalAdapter($from)),
            'to' => new Flysystem(new LocalAdapter($to)),
        ]));
    }
536129
public function moveFilesWildcard($from, $to)
    {
        coollect(glob($this->dataDir($from)))->each(function ($from) use ($to) {
            $this->mkDir($dir = $this->dataDir($to));

            rename($from, $dir.'/'.basename($from));
        });
    }
470269
public function move($action, $entity)
    {
        $this->checkSortableGroupField(static::getSortableGroupField(), $entity);

        $this->_transaction(function () use ($entity, $action) {
            $sortableField = static::getSortableField();

            $oldPosition = $this->getAttribute($sortableField);
            $newPosition = $entity->getAttribute($sortableField);

            if ($oldPosition === $newPosition) {
                return;
            }

            $isMoveBefore = $action === 'moveBefore'; // otherwise moveAfter
            $isMoveForward = $oldPosition < $newPosition;

            if ($isMoveForward) {
                $this->queryBetween($oldPosition, $newPosition)->decrement($sortableField);
            } else {
                $this->queryBetween($newPosition, $oldPosition)->increment($sortableField);
            }

            $this->setAttribute($sortableField, $this->getNewPosition($isMoveBefore, $isMoveForward, $newPosition));
            $entity->setAttribute($sortableField, $this->getNewPosition(!$isMoveBefore, $isMoveForward, $newPosition));

            $this->save();
            $entity->save();
        });
    }
658885
public function copy( $from, $to )
	{
		try {
			$this->fs->copy( $from, $to );
		} catch( \Exception $e ) {
			throw new Exception( $e->getMessage(), 0, $e );
		}
	}