Moves the file

@throws FileException When an error appeared.
@param string|Path $destination
164691
public function move($destination) {
		$destination = $this->getDestination($destination);

		if (@rename($this->getPathname(), $destination)) {
			$this->pathname = $destination;
		} else {
			throw new FileException(sprintf('Failed to move %s to %s', $this->pathname, $destination));
		}
	}
761230
public function moveFiles(Filesystem $source, Filesystem $destination): void
    {
        foreach ($source->listContents() as $path) {
            if ($path['type'] === 'file') {
                $destination->put($path['path'], $source->read($path['path']));
                $source->delete($path['path']);

                if ($this->timeout_service->isTimeNearlyUp()) {
                    throw new InternalServerErrorException(I18N::translate('The server’s time limit has been reached.'));
                }
            }
        }
    }
273453
public function move(string $destination): Response {
        $uri         = $this->fedora->sanitizeUri($this->uri);
        $destination = $this->fedora->sanitizeUri($destination);
        $request     = new Request('MOVE', $uri, ['Destination' => $destination]);
        $response    = $this->fedora->sendRequest($request);
        $cache       = $this->fedora->getCache();
        $cache->deleteById($this->getId());
        $cache->add($this);
        return $response;
    }
19794
protected function move($destination)
    {
        if ($previousRow = static::orderModel()->findByPosition($this->getOrderValue() - $destination)->first()) {
            $previousRow->{$this->getOrderField()} += $destination;
            $previousRow->save();
        }

        $this->{$this->getOrderField()} -= $destination;
        $this->save();
    }
170396
private function movePath() {
		$source = $this->getSource();
		$destinationPath = $source->getPath();
		$sourcePath = $source->getPath($this->request->from);

		$this->accessControl->checkPermission($this->getUserRole(), $this->action, $destinationPath);
		$this->accessControl->checkPermission($this->getUserRole(), $this->action, $sourcePath);

		if ($sourcePath) {
			if ($destinationPath) {
				if (is_file($sourcePath) or is_dir($sourcePath)) {
					rename($sourcePath, $destinationPath . basename($sourcePath));
				} else {
					throw new \Exception('Not file', Consts::ERROR_CODE_NOT_EXISTS);
				}
			} else {
				throw new \Exception('Need destination path', Consts::ERROR_CODE_BAD_REQUEST);
			}
		} else {
			throw new \Exception('Need source path', Consts::ERROR_CODE_BAD_REQUEST);
		}
	}
944091
private function move($destination, $tmp, $filename)
    {
        if (!is_dir($destination)) {
            // We can either create it automatically
            if ($this->destinationAutoCreate === true) {
                // Then make a directory (recursively if needed)
                @mkdir($destination, 0777, true);
                
            } else {
                // Destination doesn't exist, and we shouldn't be creating it
                throw new RuntimeException(sprintf(
                    'Destination folder does not exist', $destination
                ));
            }
        }

        $target = sprintf('%s/%s', $destination, $filename);

        // If Remote file exists and we don't want to override it, so let's stop here
        if (is_file($target)) {
            if (!$this->override) {
                return true;
            }
        }

        return move_uploaded_file($tmp, $target);
    }
153904
protected function moveFile()
    {
        // if there is an error when moving the file, an exception will
        // be automatically thrown by move(). This will properly prevent
        // the entity from being persisted to the database on error
        $this->getFile()->move($this->getUploadRootDir(), $this->path);

        $this->setFile(null);
    }
757062
public function upload($destination, array $files)
    {
        foreach ($files as $file) {
            if (!($file instanceof FileEntity)) {
                // This should never occur, but it's always better not to rely on framework users
                throw new LogicException(sprintf(
                    'Each file entity must be an instance of \Krystal\Http\FileTransfer\FileInfoInterface, but received "%s"', gettype($file)
                ));
            }

            // Gotta ensure again, UPLOAD_ERR_OK means there are no errors
            if ($file->getError() == \UPLOAD_ERR_OK) {
                // Start trying to move a file
                if (!$this->move($destination, $file->getTmpName(), $file->getUniqueName())) {
                    return false;
                }
            } else {
                // Invalid file, so that cannot be uploaded. That actually should be reported before inside validator
                return false;
            }
        }

        return true;
    }
1171624
public function moveFile($filename) {

        $destinationPath = $this->ImagesHelper->pathOfImagesUploadParentFolder() . "/" . Config::get('lasallecmsfrontend.images_folder_uploaded');

        \Input::file('featured_image_upload')->move($destinationPath, $filename);
    }
889090
public static function move($pathOld, $pathNew)
    {
        if (!is_file($pathOld)) {
            throw new IOException(sprintf("Old file %s is not a file", $pathOld));
        }

        if (!@rename($pathOld, $pathNew)) {
            throw new IOException(sprintf("Cannot rename %s to %s", $pathOld, $pathNew));
        }
    }
708076
private function move($directory, $name = null) {
        if (!is_dir($directory)) {
            if (false === @mkdir($directory, 0777, true)) {
                throw new FileException(sprintf('Unable to create the "%s" directory', $directory));
            }
        } elseif (!is_writable($directory)) {
            throw new FileException(sprintf('Unable to write in the "%s" directory', $directory));
        }

        $target = $directory . (null === $name ? $this->getFileName() : $name);

        if (!@rename($this->prePersistName, $target)) {
            $error = error_get_last();
            throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message'])));
        }

        @chmod($target, 0666 & ~umask());

        return new File($target);
    }
892376
public function save($destination = null, $newName = null)
    {
        $fileName = $this->_prepareDestination($destination, $newName);
        $pathInfo = pathinfo($fileName);
        if (!key_exists('extension', $pathInfo) || !in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())) {
            parent::save($destination, $newName);
        }
    }
402592
protected function write($destination, $content)
    {
        $directory = dirname($destination);

        if ( ! $this->files->exists($directory)) {
            $this->files->makeDirectory($directory, 0755, true);
        }

        return (bool) $this->files->put($destination, $content);
    }
309649
public function move( $destination, $newName = '' ) {
		$source = $this->file['tmp_name'];

		if ( $destination != '' && substr( $destination, - 1 ) != '/' ) {
			$destination .= '/';
		}

		if ( ! empty( $newName ) ) {
			$target = $destination . $newName;
		} else {
			$target = $destination . $this->file['name'];
		}

		if ( ! @move_uploaded_file( $source, $target ) ) {
			$error = error_get_last();

			throw new FileException(
				sprintf(
					'Could not move the file "%s" to "%s" (%s)',
					$this->getPathname(),
					$target,
					strip_tags( $error['message'] )
				)
			);
		}

		@chmod( $target, 0666 & ~umask() );

		return $target;

	}
830701
public static function deleteChainedRecursively($destination)
    {
        $destination = mb_strtolower(trim($destination, '/'));

        $redirectRules = RedirectRule::where('destination', $destination)->get();

        if ($redirectRules->count() > 1) {
            $message = 'There is multiple redirections with the same destination! ';
            $message .= 'Recursive delete will not continue';

            throw new \Exception($message);
        }

        $redirectRule = $redirectRules->first();

        if ($redirectRule === null) {
            return;
        }

        $nextDestination = $redirectRule->origin;

        $redirectRule->delete();

        self::deleteChainedRecursively($nextDestination);
    }
684421
public function afterMove($source, $destination)
    {
        $pathFilter = $this->pathFilter;
        if ($pathFilter && !$pathFilter($source)) {
            return;
        }
        // If the destination is filtered, afterUnbind will handle cleaning up
        // the properties.
        if ($pathFilter && !$pathFilter($destination)) {
            return;
        }

        $this->backend->move($source, $destination);
    }
527672
public function move ($destination , $item) {
        if ($destination instanceof ARedisSet) {
            $destination->_count = null;
            $destination->_data = null;
            $destination = $destination->name;
        }
        $this->_count = null;
        $this->_data = null;
        return $this->getConnection ()->getClient ()->smove ($this->name , $destination , $item);
    }