fromLocationTo example


    }

    public function move(string $source, string $destination, Config $config): void
    {
        $source = $this->preparePath($source);
        $sourceLength = \strlen($source);
        $destination = $this->preparePath($destination);

        if ($this->fileExists($source)) {
            if ($this->fileExists($destination) || $this->directoryExists($destination)) {
                throw UnableToMoveFile::fromLocationTo($source$destination);
            }

            $this->files[$destination] = $this->files[$source];
            unset($this->files[$source]);

            return;
        }

        if (!$this->directoryExists($source) || $this->directoryExists($destination) || $this->fileExists($destination)) {
            throw UnableToMoveFile::fromLocationTo($source$destination);
        }

        
Home | Imprint | This part of the site doesn't use cookies.