Set the configuration path

@param null|string $path
@return Configuration
433190
public function setPath(?string $path): Configuration
    {
        $this->path = realpath($path) ?: $path;

        return $this;
    }
1065345
public function setPath($path) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        if ($path[0] != '/')   throw new StrutsConfigException('<mapping'.($this->name ? ' name="'.$this->name.'"':'').' path="'.$path.'": Illegal path (value must start with a slash "/").');

        $this->path = $path;
        return $this;
    }
964720
public function createFromConfig(string $path) : SettingsContract {
        $configData = (array) $this->filesystem->getRequire($path);

        return $this->createFromData($configData);
    }
472218
public function setPath($path)
	{
		if($path !== false)
			$path = trim($path, '/');

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

		return $this;
	}
1189963
public function loadEnv(string $path): Configurator
    {
        if (is_readable($path)) {
            $this->dotEnv->load($path);
        }

        return $this;
    }
985166
public function changePath($path)
    {
        $pathname = $this->createPathname($path, $this->getBasename(), $this->getExtension());

        return new static($pathname);
    }
1317913
public function path($path = null)
    {
        if (null === $path) {
            return $this->path;
        }
        $this->path = $path;

        return $this;
    }
283646
public function setPath($path)
    {
        $this->path = '';
        $this->realPath = $path;

        if(!empty($path)) {
            $this->path .= $this->str($path)->trim()->trimLeft('/')->trimRight('/')->val();
        }

        return $this;
    }
1231601
public function getSetting($path)
    {
        if (!$this->hasSetting($path)) {
            return null;
        }
        
        $value = $this->resolvePath($path);
        
        return $value;
    }
1023803
private function addPath($path)
    {
        $path = $this->resolvePath($path);

        if ($this->validatePath($path)) {
            $this->paths[] = $path;
        }

        return $this;
    }
1054542
public function setFile($path)
    {
        if (empty($path) || !is_readable($path)) {
            /**
             * @see Zend_Auth_Adapter_Http_Resolver_Exception
             */
            require_once 'Zend/Auth/Adapter/Http/Resolver/Exception.php';
            throw new Zend_Auth_Adapter_Http_Resolver_Exception('Path not readable: ' . $path);
        }
        $this->_file = $path;

        return $this;
    }
927175
public function setClientCertificatePath(array $path = null)
    {
        ValidationUtility::ensureNullOrArrayOfString('$path', $path);

        $this->clientCertificatePath = $path;

        return $this;
    }
144394
private function setPath($path)
    {
        $this->path =  preg_replace_callback(
            '/(?:[^' . self::$charList . ':@\/%]+|%(?![A-Fa-f0-9]{2}))/',
            [$this, 'encode'],
            $path
        );

        return $this;
    }
1011264
public function configDir(string $path): self
    {
        $this->validatePathIsRelativeToProject($path, __METHOD__);
        $this->configDir = rtrim($path, '/');

        return $this;
    }
1328246
public function readConfigDir(string $path): Configurator
    {
        if (!is_dir($path)) {
            throw new \InvalidArgumentException(
                sprintf("Config dir isn't a directory! %s given.", $path));
        }

        $entitiesDir = new \DirectoryIterator($path);
        foreach ($entitiesDir as $fileInfo) {
            if (!$fileInfo->isFile() || ('php' !== $fileInfo->getExtension())) {
                continue;
            }
            require_once($fileInfo->getPathname());
        }

        return $this;
    }
1026926
public function relativePath($path = null)
    {
        if (null === $path) {
            return str_replace(asset('/'), '', $this->relativePath);
        }

        $this->relativePath = $path;

        return $this;
    }
860717
protected static function initPath($path)
    {
        // Fallback
        if (empty($path)) {
            $defaultDir = self::getProperty('application.startdir');
            $path = $defaultDir . DIRECTORY_SEPARATOR . self::DEFAULT_BUILD_FILENAME;
        }

        // Adding filename if necessary
        if (is_dir($path)) {
            $path .= DIRECTORY_SEPARATOR . self::DEFAULT_BUILD_FILENAME;
        }

        // Check if path is available
        $dirname = dirname($path);
        if (is_dir($dirname) && !is_file($path)) {
            return $path;
        }

        // Path is valid, but buildfile already exists
        if (is_file($path)) {
            throw new ConfigurationException('Buildfile already exists.');
        }

        throw new ConfigurationException('Invalid path for sample buildfile.');
    }