Set save path

@param $savePath
@return $this
181152
public function setSavePath($savePath)
    {
        if (empty($savePath)) return $this;

        $this->savePath = $savePath;

        if (!is_dir($this->savePath)) {
            mkdir($this->savePath);
        }

        return $this;
    }
81245
public function setFile(string $filePath): self
    {
        IOExpect::isFile($filePath);
        IOExpect::isReadable($filePath);

        $this->file = $filePath;

        return $this;
    }
586899
public function setPath($path) {
        if (!is_string($path)) throw new IllegalTypeException('Illegal type of parameter $path: '.gettype($path));
        if (!strlen($path))    throw new InvalidArgumentException('Invalid argument $path: '.$path);

        $this->path = $path;
        return $this;
    }
418195
public function save($path)
    {
        $this->validate();
        $path = rtrim($path, "\\/") . DS;
        $this->_savePackage($path);
        return $this;
    }
131362
public function setPath($path)
        {
            if ($this->validatePath($path) === false) {
                throw new Exception("Path \"$path\" is not a valid HTTP path");
            }

            $oldPath     = $this->_path;
            $this->_path = $path;

            return $oldPath;
        }
1182309
public function save($savepath) {
		$result = move_uploaded_file($this->stored_filename, $savepath);
		if ($result === true) {
			$this->stored_filename = $savepath;
			return true;
		} else {
			return false;
		}
	}
619538
function setPath($path = null)
    {
        if ($path === null)
            $path = array();

        // the associate array is useless
        $this->_pathSequence = array_values( (array) $path);
        return $this;
    }
1301418
public function setSortablePropertyPath($sortablePropertyPath)
    {
        if (!empty($sortablePropertyPath) && false === strpos($sortablePropertyPath, '.')) {
            $sortablePropertyPath = 'o.'.$sortablePropertyPath;
        }

        $this->sortablePropertyPath = $sortablePropertyPath;

        return $this;
    }
532157
public function open($savePath, $sessionName)
    {
        $this->savePath = $savePath;
        $this->sessionName = $sessionName;

        return true;
    }
650960
public function save($save_path = null, $make_paths = false)
	{
		$path = $this->source;

		if (!is_null($save_path))
		{
			$info = pathinfo($save_path);

			if ($make_paths)
			{
				\App::get('filesystem')->makeDirectory($info['dirname']);
			}

			if (!is_dir($info['dirname']) && $make_paths == false)
			{
				$this->setError(\Lang::txt('You must supply a valid path or allow save function to create recursive path'));
				return;
			}

			$path = $save_path;
		}

		$this->output($path);
	}
305532
public function setFilePath($path) {
		$path = realpath($path);
		
		if ($path === false) {
			throw new NoPath('Invalid path: ' . $path);
		}
		
		$this->path = $path;
		
		return $this;
	}
998297
public function set($path, $value)
    {
        parent::set($path, $value);

        $this->save();

        return $this;
    }
749002
public function save($path = self::DEFAULT_FILENAME)
	{
		$file = new File($path);

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

		return $this;
	}
454197
protected function setSavePath($savePath): void
    {
        if (!is_dir($savePath)
            || !is_writable($savePath)
        ) {
            throw new ComponentException('Session path is not writable');
        }
        session_save_path($savePath);
    }
109035
public function setPath(string $path)
    {
        $path = '/' . ltrim($path, '/');
        $this->query = null;
        $this->fragment = null;
        if (preg_match('/^(.*?)(\\?([^#]*))?(#(.*))?$/u', $path, $matches))
        {
            $path = $matches[1];
            $this->query = !empty($matches[3]) ? $matches[3] : null;
            $this->fragment = !empty($matches[5]) ? $matches[5] : null;
        }

        $this->path = $path;
        return $this;
    }
1200729
public function setPath($path)
    {
        static $search  = [' ',   '?'];
        static $replace = ['%20', '%3F'];
        $this->path = str_replace($search, $replace, $path);

        return $this;
    }
1168001
protected function parseConnectionsFromSavePath($savePath)
    {
        $connections = (array) explode(',', $savePath);
        $connections = array_map('trim', $connections);

        return array_map([$this, 'parseConnectionItemFromSavePath'], $connections);
    }