Checks if the given path is of the given type.

@param  string  $path
@param  string  $type
@return boolean
495154
protected function is($path, $type)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        switch ($type) {
            case 'readable':
                return $this->adapter->isReadable($path);
            case 'writable':
                return $this->adapter->isWritable($path);
            case 'executable':
                return $this->adapter->isExecutable($path);
            case 'file':
                return $this->adapter->isFile($path);
            case 'dir':
                return $this->adapter->isDir($path);
            case 'any':
                return $this->adapter->fileExists($path);
            default:
                throw new FilesystemException("Unknown file type '{$type}'");
        }
    }
111541
public function isDirectory($path)
    {
        // The root is always a directory
        if($path == '/') {
            return true;
        }
        $parentDir = $this->dirname($path);
        return in_array($path, $this->directories($parentDir));
    }
1353103
public function is($path)
    {
        list($package, $route) = $this->locate($path);

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

        return true;
    }
1102189
private function getFullPath($type, $path)
    {
        return sprintf('%s/%s/%s', $this->config['web_root_dir'], $this->config[$type . '_path'], $path);
    }
793223
function filetype($path)
    {
        $type = $this->_get_stat_cache_prop($path, 'type');
        if ($type === false) {
            return false;
        }

        switch ($type) {
            case NET_SFTP_TYPE_BLOCK_DEVICE:
                return 'block';
            case NET_SFTP_TYPE_CHAR_DEVICE:
                return 'char';
            case NET_SFTP_TYPE_DIRECTORY:
                return 'dir';
            case NET_SFTP_TYPE_FIFO:
                return 'fifo';
            case NET_SFTP_TYPE_REGULAR:
                return 'file';
            case NET_SFTP_TYPE_SYMLINK:
                return 'link';
            default:
                return false;
        }
    }
31342
public function checkIsHiddenPath($path)
    {
        $_clientPathParts = explode("/", trim($path, "/"));
        if ($_clientPathParts) {
            foreach ($_clientPathParts as $_part) {
                if ($this->checkIsHiddenFolder($_part)) {
                    return true;
                }
            }
        }

        return false;
    }
216653
public function isFile($path)
    {
        $metadata = $this->dropbox->getMetadata($this->pathRoot.$path);
        return is_array($metadata) && isset($metadata['is_dir']) && $metadata['is_dir']==false;
    }
983326
public boolean isFiltered(String path) {

        for (int j = 0; j < m_filterRules.size(); j++) {
            Pattern pattern = m_filterRules.get(j);
            if (isPartialMatch(pattern, path)) {
                return m_type.equals(TYPE_EXCLUDE);
            }
        }

        return m_type.equals(TYPE_INCLUDE);
    }
1017277
protected static function isValidPath($path)
    {
        if (strpos($path, '?') !== false) {
            return false;
        }
        if (strpos($path, '*') !== false) {
            return false;
        }
        if (strpos($path, ':') !== false) {
            return false;
        }
        if (strpos($path, '|') !== false) {
            return false;
        }
        if (strpos($path, '\\') !== false) {
            return false;
        }
        if (strpos($path, '<') !== false) {
            return false;
        }
        if (strpos($path, '>') !== false) {
            return false;
        }
        if (strpos($path, '"') !== false) {
            return false;
        }

        return true;
    }
598359
function is_link($path)
    {
        $result = $this->_get_lstat_cache_prop($path, 'type');
        if ($result === false) {
            return false;
        }
        return $result === NET_SFTP_TYPE_SYMLINK;
    }
793260
public function isValidPath($path)
    {
        $isValidPath = false;

        $pathValue = $this->getValueByPath($path);
        if (!is_null($pathValue)) {
            $isValidPath = true;
        }

        return $isValidPath;
    }
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;
    }
1132009
public static function isAbsolute($path)
    {
        if ('' === $path) {
            return false;
        }

        Assert::string($path, 'The path must be a string. Got: %s');

        // Strip scheme
        if (false !== ($pos = strpos($path, '://'))) {
            $path = substr($path, $pos + 3);
        }

        // UNIX root "/" or "\" (Windows style)
        if ('/' === $path[0] || '\\' === $path[0]) {
            return true;
        }

        // Windows root
        if (strlen($path) > 1 && ctype_alpha($path[0]) && ':' === $path[1]) {
            // Special case: "C:"
            if (2 === strlen($path)) {
                return true;
            }

            // Normal case: "C:/ or "C:\"
            if ('/' === $path[2] || '\\' === $path[2]) {
                return true;
            }
        }

        return false;
    }
912957
protected function checkFile($path, $type, $file)
    {
        $filePath = implode('/', [$path, $type, $file]);

        if (is_file($filePath)) {
            return $filePath;
        } else {
            return false;
        }
    }
369184
protected function checkPath($path)
    {
        foreach ($this->chroots as $chroot) {
            if (StringHelper::contains($path, $chroot)) {
                return true;
            }
        }
        return false;
    }
481011
public function isDir($path)
    {
        $node = $this->at($path);
        return null !== $node && 'dir' === $node->type;
    }