Check if given pluggable path exists.

@param string $folder

@return bool
779983
protected function pathExists($folder)
    {
        $folder = Str::studly($folder);

        return in_array($folder, $this->getAllBaseNames());
    }
901767
protected function _canBeDeleted($path)
    {
        $type = $this->_plugin->isTheme ? 'theme' : 'plugin';
        if (!file_exists($path) || !is_dir($path)) {
            $this->err(__d('installer', "{0} directory was not found: {1}", ($type == 'plugin' ? __d('installer', "Plugin's") : __d('installer', "Theme's")), $path));

            return false;
        }

        $folder = new Folder($path);
        $folderContent = $folder->tree();
        $notWritable = [];

        foreach ($folderContent as $foldersOrFiles) {
            foreach ($foldersOrFiles as $element) {
                if (!is_writable($element)) {
                    $notWritable[] = $element;
                }
            }
        }

        if (!empty($notWritable)) {
            $this->err(__d('installer', "{0} files or directories cannot be removed from your server, please check write permissions of:", ($type == 'plugin' ? __d('installer', "Some plugin's") : __d('installer', "Some theme's"))));
            foreach ($notWritable as $path) {
                $this->err(__d('installer', '  - {0}', [$path]));
            }

            return false;
        }

        return true;
    }
734193
public function deletePluginEntry($folder, $element=null)
	{
		if ($this->baseDb->tableExists('#__plugins'))
		{
			// Delete plugin(s) entry
			$query = "DELETE FROM `#__plugins` WHERE `folder` = " . $this->baseDb->quote($folder) . ((!is_null($element)) ? " AND `element` = '{$element}'" : "");
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed plugin entry for "%s"', 'plg_' . $folder . ($element ? '_' . $element : '')));

			return true;
		}
		elseif ($this->baseDb->tableExists('#__extensions'))
		{
			// Delete plugin(s) entry
			$query = "DELETE FROM `#__extensions` WHERE `folder` = " . $this->baseDb->quote($folder) . ((!is_null($element)) ? " AND `element` = '{$element}'" : "");
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed extension entry for plugin "%s"', 'plg_' . $folder . ($element ? '_' . $element : '')));

			return true;
		}

		return false;
	}
140095
public function exists($path)
	{
		// Return default value if path is empty
		if (empty($path))
		{
			return false;
		}

		// Explode the registry path into an array
		$nodes = explode($this->separator, $path);

		// Initialize the current node to be the registry root.
		$node  = $this->data;
		$found = false;

		// Traverse the registry to find the correct node for the result.
		foreach ($nodes as $n)
		{
			if (\is_array($node) && isset($node[$n]))
			{
				$node  = $node[$n];
				$found = true;

				continue;
			}

			if (!isset($node->$n))
			{
				return false;
			}

			$node  = $node->$n;
			$found = true;
		}

		return $found;
	}
134574
public function show($folder)
    {
        $this->manager->resetPath($folder);

        if (!$this->manager->blobExists()) {
            return $this->json('File not found.', 404);
        }

        $list = $this->manager->folderContent();

        return $this->json($list);
    }
89666
public function has($path)
    {
        $location = $this->applyPathPrefix($path);

        if ($this->s3Client->doesObjectExist($this->bucket, $location, $this->options)) {
            return true;
        }

        return $this->doesDirectoryExist($location);
    }
940475
public function exists($path)
	{
		$path = Util::normalizePath($path);

		return (bool) $this->adapter->exists($path);
	}
1172257
protected function getPluginPaths(Folder $Folder, $plugin) {
		$res = $Folder->find('Queue.+Task\.php');
		foreach ($res as $key => $r) {
			$name = basename($r, 'Task.php');
			if (in_array($name, $this->tasks)) {
				unset($res[$key]);
				continue;
			}
			$res[$key] = $plugin . '.' . $name;
		}

		return $res;
	}
1349290
public function has($path)
    {
        $object = $this->applyPathPrefix($path);

        try {
            $exists = $this->client->doesObjectExist($this->bucket, $object);
        } catch (OssException $e) {
            return false;
        }

        return $exists;
    }
776002
public function exists($path, $public = true)
    {
        $path = $this->_relativepath($path, $public);

        return $this->_exists($path);
    }
1276347
public static function exists($path, $sensitive = false)
    {
        if ($sensitive === null) {
            return file_exists($path);
        }

        $path = Path::clean($path, DIRECTORY_SEPARATOR);

        if (!$sensitive) {
            $lowerfile = strtolower($path);

            foreach (glob(dirname($path) . DIRECTORY_SEPARATOR . '*') as $file) {
                if (strtolower($file) === $lowerfile) {
                    return true;
                }
            }
        } else {
            foreach (glob(dirname($path) . DIRECTORY_SEPARATOR . '*') as $file) {
                if ($file === $path) {
                    return true;
                }
            }
        }

        return false;
    }
397335
public function exists($path)
  {
    $name = null;
    $subtree = $this->subtree($path, $name);

    return !is_null($subtree) && isset($subtree->_ownData[$name]);
  }
91585
public function exists(string $path): bool
    {
        $name = null;
        $subtree = $this->subtree($path, $name);

        return null !== $subtree && isset($subtree->ownData[$name]);
    }
1276731
public function has(string $path)
    {
        [$prefix, $path] = $this->getPrefixAndPath($path);

        return $this->getFilesystem($prefix)->has($path);
    }
648784
public static function isLink(string $dir = ''): bool
    {
        $dir = static::normalizePath($dir);
        return static::exists($dir) && \is_link($dir);
    }
1286705
public function exists()
    {
        clearstatcache();

        if (is_link($this->path)) {
            return true;
        } else {
            if ($this->isDirectory()) {
                return true;
            } else {
                return @file_exists($this->path) || is_link($this->path);
            }
        }
    }
1002209
public function has($path) {
        $mapping = $this->mapper->get($path);

        if (!$mapping) {
            return false;
        }

        return $this->client->has($mapping['fid']);
    }