Save the current image on the desired path

@param string $path File system path to save the image to
194456
public function save($path = 'i')
    {
        $tmp_path = sys_get_temp_dir() . '/';
        $this->handle->process($tmp_path);

        $this->s3->sendFile($tmp_path . $this->handle->file_dst_name, $path, $this->_new_name);
        unlink($tmp_path . $this->handle->file_dst_name);

        return $this->_new_name;
    }
443484
public function setPath($path)
    {
        if (!file_exists($path) || !is_dir($path)) {
            throw new \InvalidArgumentException(
                'Expected the template path to be an existing directory, received: '.$path
            );
        }

        $this->path = $path;
    }
971185
public static function addPath($path)
    {
        if (!in_array($path, self::$paths)) {
            array_unshift(self::$paths, $path);
        }
    }
500268
private function getImagePath($path)
    {
        if ($path && file_exists($this->filesystem->getRootDir() . $path)) {
            return $path;
        }

        return $this->noImagePath;
    }
964299
public function savePath($path = null)
    {
        if ($path === null) {
            return session_save_path();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($path)) {
            throw new \InvalidArgumentException('Session path must be null or a string');
        }
        if (!is_dir($path)) {
            throw new \InvalidArgumentException("Path not found: {$path}");
        }
        session_save_path($path);
    }
1345676
protected function ensureDirectory($path)
    {

        if ( !$this->fs->exists($path) )
        {
            $this->fs->makeDirectory($path);
        }
    }
472218
public function setPath($path)
	{
		if($path !== false)
			$path = trim($path, '/');

		$this->setProperty('path', $path);

		return $this;
	}
1025835
public function addFolder(string $path)
    {
        if (!\is_dir($path)) {
            throw new \RuntimeException(\sprintf('The path "%s" does not exist or is not a directory.', $path));
        }
        $this->paths[] = $path;
    }
47121
public static function load(string $path): void
    {
        $filePath = \absolute_path($path, static::FILE);
        if (!\is_readable($filePath) || !\is_file($filePath)) {
            return;
        }

        $array = self::optimizeGet($path, $filePath);

        if ($array === false) {
            $array = \parse_ini_file($filePath, false, INI_SCANNER_RAW);
        }

        foreach ($array as $name => $value) {
            static::set($name, $value);
        }

        self::optimizeSet($path, $array, $filePath);
    }
1135916
public function addPath($path)
    {
        // just force to array
        settype($path, 'array');

        // loop through the path directories
        foreach ($path as $dir) {
            // no surrounding spaces allowed!
            $dir = trim($dir);

            // remove trailing slash
            if (substr($dir, -1) == DIRECTORY_SEPARATOR) {
                $dir = substr_replace($dir, '', -1);
            }

            // add to the top of the search dirs
            array_unshift($this->_paths, $dir);
        }
    }
1099639
public function setPath($path)
    {
        // clear out the prior search dirs
        $this->configList[self::TPL_PATH_LIST] = [];
        // always add the fallback directories as last resort
        $this->addPath('.');
        // actually add the user-specified directory
        $this->addPath($path);
    }
70129
public static function appendPath($path)
    {
        $path = str_replace('//', '/', rtrim($path, '/'));
        if (is_dir($path) && !in_array($path, self::$_paths)) {
            array_push(self::$_paths, $path);
        }
    }
749002
public function save($path = self::DEFAULT_FILENAME)
	{
		$file = new File($path);

		$file->write(json_encode($this->data));

		return $this;
	}
915628
private function setExtensionFromPath(string $path): self
    {
        $lastDotPosition = strrchr($path, '.');
        if (false === $lastDotPosition) {
            throw new ImageException('File extension is missing!');
        }

        $originalExtension = strtolower(substr($lastDotPosition, 1));
        if (false === array_key_exists($originalExtension, self::EXTENSION_MAPPING)) {
            throw new ImageException(sprintf('Unsupported image format %s!', $originalExtension));
        }

        $this->extension = self::EXTENSION_MAPPING[$originalExtension];
        return $this;
    }
1284790
public function setPath($path = "")
    {
        if ($path != "") {
            $this->_path = str_replace("\\", DS, $path);
            $this->_path = (substr($this->_path, -1) == DS) ? substr($this->_path, 0, -1) : $this->_path;
        }
    }
1041844
public function setPath($path)
    {
        if (!file_exists($path))
        {
            mkdir($path, 0777, true);
        }

        $this->path = $path;
    }
1153782
protected function makeDirectory(string $path): void
    {
        if (!$this->filesystem->isDirectory(dirname($path))) {
            $this->filesystem->makeDirectory(dirname($path), 0777, true, true);
        }
    }