Drags one element to another
@param string $sourceXpath
@param string $destinationXpath
@throws DriverException
359728
public function dragTo($sourceXpath, $destinationXpath) {
    $sourceElement = $this->findElement($sourceXpath, 1);
    $destinationElement = $this->findElement($destinationXpath, 1);
    $this->browser->drag($sourceElement["page_id"], $sourceElement["ids"][0], $destinationElement["ids"][0]);
  }
565890
private static function validateSource($basePath, $sourcePath)
    {
        $urlData = parse_url($sourcePath);
        if (!empty($urlData['scheme'])) {
            return;
        }

        if (!\helpers_File::isFileInsideDirectory($sourcePath, $basePath)) {
            throw new InvalidSourcePathException($basePath, $sourcePath);
        }
    }
808568
public <Source extends RouteSource, Destination extends RouteDestination> RoutingBuilder add(Route<Source, Destination> route) {
        routes.add(route);
        return this;
    }
71723
public void dragAndDropByOffset(int xOffset, int yOffset) throws WidgetException {
		try {
		 Actions builder = new Actions(getGUIDriver().getWrappedDriver());
		  synchronized (InteractiveElement.class) {
		      getGUIDriver().focus();
		      builder.dragAndDropBy(getWebElement(), xOffset, yOffset).build().perform();
		  }
		} catch (Exception e) {
			throw new WidgetException(
					"Error while performing drag and drop from " + getByLocator()
							+ " offset by X: " + xOffset + " Y: " + yOffset, getByLocator(), e);
		}
	 }
1013876
public function map($sourcePath, $targetPath)
  {
    if (file_exists($sourcePath)) {
      $items = array();
      if (is_file($sourcePath)) {
        $items[$targetPath] = $sourcePath;
      } elseif (is_dir($sourcePath)) {
        $finder = new Finder\Finder();
        foreach ($finder->in($sourcePath)->files() as $file) {
          /* @var $file Finder\SplFileInfo */
          $fileTargetPath = $targetPath . "/" . $file->getRelativePathname();
          $items[$fileTargetPath] = $file->getPathname();
        }
      }

      foreach ($items as $target => $source) {
        $formulae = new AssetFormulae();
        $formulae->setInputs(
          array($source)
        );
        $formulae->setOptions(
          array("output" => $target)
        );

        $this->append($formulae);
      }
    }
  }
262083
public function copyDirectory($sourcePath, $destinationPath)
    {
        $sourceDirectory = opendir($sourcePath);

        if (! is_dir($destinationPath)) {
            self::createDirectory($destinationPath);
        }
        while (false !== ($file = readdir($sourceDirectory))) {
            if (($file !== '.') && ($file !== '..')) {
                $sourceFile = $sourcePath.'/'.$file;
                $destinationFile = $destinationPath.'/'.$file;
                if (is_dir($sourceFile)) {
                    self::copyDirectory($sourceFile, $destinationFile);
                } else {
                    self::copyFile($sourceFile, $destinationFile);
                }
            }
        }
        closedir($sourceDirectory);
    }
881190
public function compress($sourcePath, $filePath = null)
    {
        $filePath = empty($filePath)
            ? $this->filePath
            : $filePath;

        $zip = new \ZipArchive();
        $zip->open($filePath, \ZipArchive::CREATE);
        $zip->addEmptyDir(pathinfo($sourcePath, PATHINFO_BASENAME));
        $this->recursiveCompress($sourcePath, strlen(dirname($sourcePath, 2) . DIRECTORY_SEPARATOR), $zip);
        $zip->close();
    }
684720
public function dragOffset($selector, $x = 0, $y = 0)
    {
        (new WebDriverActions($this->driver))->dragAndDropBy(
            $this->resolver->findOrFail($selector), $x, $y
        )->perform();

        return $this;
    }
1153045
private function extract(string $sourceFile, string $destinationDir): self
    {
        $zip = new ZipArchive();

        if ($zip->open($sourceFile)) {
            $zip->extractTo($destinationDir);
            $zip->close();
        }

        return $this;
    }
1062959
public void setSourcePath(String sourcePath) {
		this.sourcePath = new ArrayList<>();
		for (final String path : Strings.split(sourcePath, Pattern.quote(File.pathSeparator))) {
			this.sourcePath.add(normalizeFile(path));
		}
	}
374814
public function publish(string $name, string $destinationPath)
    {
        return $this->publisher->publish($name, $destinationPath);
    }
584259
public function setSource($sourceIso, $sourcePath, $sourceLanguagePath)
	{
		$this->sourceIso = $sourceIso;
		$this->sourcePath = $sourcePath;
		$this->sourceLanguagePath = $sourceLanguagePath;
		$this->langkeyValidator->setSource($sourceIso, $sourcePath, $sourceLanguagePath);
		return $this;
	}
184855
public function move(string $sourceInterface, string $sourceName, string $targetInterface, string $targetName)
    {
        $sourceIndex = $sourceInterface . '-' . $sourceName;
        if (! isset($this->container[$sourceIndex])) {
            throw $this->unbound($sourceIndex);
        }
        $targetIndex = $targetInterface . '-' . $targetName;
        $this->container[$targetIndex] = $this->container[$sourceIndex];
        unset($this->container[$sourceIndex]);
    }
794712
public function dragAndDropBy(WebDriverElement $source, $x_offset, $y_offset)
    {
        $this->action->addAction(
            new WebDriverClickAndHoldAction($this->mouse, $source)
        );
        $this->action->addAction(
            new WebDriverMoveToOffsetAction($this->mouse, null, $x_offset, $y_offset)
        );
        $this->action->addAction(
            new WebDriverButtonReleaseAction($this->mouse, null)
        );

        return $this;
    }
572442
public static void mergeFiles(String[] filePath, String destinationFilePath, String[] filterRegex) throws IOException {
        mergeFiles(getFiles(filePath), new File(destinationFilePath), filterRegex);
    }
870447
def move(path,destination)
      path = @uri.merge(path).path
      destination = @uri.merge(destination).to_s
      headers = {'Destination' => destination}
      res = @handler.request(:move, path, nil, headers.merge(@headers))
      res.body
    end
154258
public function copyFrom($sourceModel, $destinationModel)
    {
        $this->guardProviderNames($sourceModel);
        $this->guardProviderNames($destinationModel);

        $setters = $this->getSetters();

        if (empty($setters) || !\is_array($setters)) {
            throw new DcGeneralRuntimeException(
                \sprintf(
                    'No relationship setter defined from %s to %s.',
                    $this->getSourceName(),
                    $this->getDestinationName()
                )
            );
        }

        foreach ($setters as $setter) {
            if (!$this->isValidSetter($setter)) {
                throw new DcGeneralRuntimeException(
                    \sprintf(
                        'Invalid relationship setter entry, ensure it is an array containing only "to_field" and
                    one of "from_field", "value": %s',
                        \var_export($setter, true)
                    )
                );
            }

            if (isset($setter['from_field'])) {
                $destinationModel->setProperty($setter['to_field'], $sourceModel->getProperty($setter['to_field']));

                continue;
            }

            $destinationModel->setProperty($setter['to_field'], $setter['value']);
        }
    }