@param string $path

@throws \InvalidArgumentException

@return bool
510040
public function remove(string $path) : bool
    {
        $last = $explode = explode('/', $path);
        $last = array_pop($last);

        $config = &$this->config;
        while ($element = array_shift($explode)) {
            if (!isset($config[$element])) {
                throw new \InvalidArgumentException(
                    sprintf("Invalid configuration path '%s'", $path)
                );
            }

            if ($element === $last) {
                unset($config[$element]);

                return true;
            } else {
                $config = &$config[$element];
            }
        }

        return false;
    }
886433
public function has(string ...$path): bool
    {
        try {
            $this->get(...$path);
        } catch (ConfigKeyNotFoundException $e) {
            return false;
        }

        return true;
    }
1179098
public function path(string $path) : PathList
    {
        if (!file_exists($path)) {
            throw new \InvalidArgumentException(
                'Arg path doesn\'t exist, path[' . $path . '].'
            );
        }
        if (!is_dir($path)) {
            throw new \InvalidArgumentException(
                'Arg path is not a directory, path[' . $path . '].'
            );
        }
        $this->path = $path;
        return $this;
    }
326481
protected function setPath($path)
    {
        if ($path !== '' && !$this->isValidPath($path)) {
            throw new \InvalidArgumentException("Invalid path '$path'");
        }
        
        $this->path = (string)$path;
    }
89349
public function handle($path, $algo = 'sha256')
    {
        if (!in_array($algo, hash_algos())) {
            throw new \InvalidArgumentException('Hash algorithm ' . $algo . ' is not supported');
        }

        $stream = $this->filesystem->readStream($path);

        if ($stream === false) {
            return false;
        }

        $hc = hash_init($algo);
        hash_update_stream($hc, $stream);

        return hash_final($hc);
    }
197501
protected function validatePath($path)
    {
        if (empty($path)) {
            return false;
        }

        // we are always operating from root directory
        // so forbid relative paths
        if (false !== strpos($path, '..')) {
            return false;
        }

        return true;
    }
849576
protected function setPath($path)
    {
        $this->uriString = null;

        $path = (string) $path;

        if (strpos($path, '?') !== false) {
            throw new InvalidArgumentException(
                'Invalid path provided; must not contain a query string.'
            );
        }

        if (strpos($path, '#') !== false) {
            throw new InvalidArgumentException(
                'Invalid path provided; must not contain a URI fragment.'
            );
        }

        $this->path = static::encode($path);

        return $this;
    }
759447
protected function validatePath(string $path): void
    {
        if (empty($path)) {
            $this->fail(new InvalidArgumentException("Path is not specified"));
        }

        if (!is_string($path)) {
            $this->fail(new InvalidArgumentException("Path is not a string"));
        }
    }
215401
protected static function filterPath($path)
    {
        if (! is_string($path)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid path provided; must be a string argument; received %s',
                (is_object($path) ? get_class($path) : gettype($path))
            ));
        }

        if ($path && $path[0] === '/') {
            $path = '/' . ltrim($path, '/');
        }

        return preg_replace_callback(
            '/(?:[^' . self::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/u',
            function (array $matches) {
                rawurlencode($matches[0]);
            },
            $path
        );
    }
1318455
public function has($path)
    {
        try {
            $this->api->resource($path);
        } catch (Exception $e) {
            return false;
        }

        return true;
    }
940475
public function exists($path)
	{
		$path = Util::normalizePath($path);

		return (bool) $this->adapter->exists($path);
	}
1247677
public function has($path) {
        $target = &$this->all;
        foreach (explode('.', $path) as $key) {
            if (array_key_exists($key, $target)) {
                $target = &$target[$key];
            } else return false;
        }
        return true;
    }
611385
public function setPath(array $path)
    {
        if (count($path) === 0) {
            $msg = "The path argument must be a non-empty array.";
            throw new InvalidArgumentException($msg);
        } else {
            $this->path = $path;
        }
    }
732190
public function checkPath($path)
    {
        $path = realpath($path);

        return ($path !== false && is_dir($path)) ? $path : false;
    }
342525
public static function lookupByPath($path)
    {
        if (empty($path)) {
            throw new \InvalidArgumentException('Argument "path" cannot be empty');
        }

        foreach (self::$methods_config as $key => $val) {
            if ($val['path'] === $path) {
                return $val;
            }
        }

        return null;
    }
499763
public function set($path)
	{
		if (! is_string($path)) {
			throw new \InvalidArgumentException();
		}
		if ($path === '') {
			$this->setParts([]);
		} else {
			$this->setParts(explode('/', $path));
		}
		return $this;
	}
295340
public function deleteCache($path)
    {
        if (!$this->groupCacheInFolders) {
            throw new InvalidArgumentException(
                'Deleting cached image manipulations is not possible when grouping cache into folders is disabled.'
            );
        }

        return $this->cache->deleteDir(
            dirname($this->getCachePath($path))
        );
    }