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);
		}
	}
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);
		}
	}
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 ) ; } }
Move file or directory to another folder

@throws \Exception
Move file or directory to another folder