{"id":42413690,"url":"https://github.com/jshaptic/minimatch-javaport","last_synced_at":"2026-01-28T01:52:39.141Z","repository":{"id":45186965,"uuid":"437275964","full_name":"jshaptic/minimatch-javaport","owner":"jshaptic","description":"A glob matcher in java.","archived":false,"fork":false,"pushed_at":"2022-01-06T14:35:16.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-06-30T18:05:29.266Z","etag":null,"topics":["java","minimatch"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jshaptic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-11T12:27:54.000Z","updated_at":"2022-01-06T15:17:41.000Z","dependencies_parsed_at":"2022-09-02T06:43:46.070Z","dependency_job_id":null,"html_url":"https://github.com/jshaptic/minimatch-javaport","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/jshaptic/minimatch-javaport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshaptic%2Fminimatch-javaport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshaptic%2Fminimatch-javaport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshaptic%2Fminimatch-javaport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshaptic%2Fminimatch-javaport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jshaptic","download_url":"https://codeload.github.com/jshaptic/minimatch-javaport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jshaptic%2Fminimatch-javaport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28833065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","minimatch"],"created_at":"2026-01-28T01:52:38.501Z","updated_at":"2026-01-28T01:52:39.135Z","avatar_url":"https://github.com/jshaptic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minimatch-javaport\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/535b2d6e4b0fe84a2dc3/maintainability)](https://codeclimate.com/github/jshaptic/minimatch-javaport/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/535b2d6e4b0fe84a2dc3/test_coverage)](https://codeclimate.com/github/jshaptic/minimatch-javaport/test_coverage)\n![Maven Central](https://img.shields.io/maven-central/v/com.github.jshaptic/minimatch-javaport)\n[![javadoc](https://javadoc.io/badge2/com.github.jshaptic/minimatch-javaport/javadoc.svg)](https://javadoc.io/doc/com.github.jshaptic/minimatch-javaport)\n[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA minimal matching utility.\n\n## Usage\n\n```java\nMinimatch.minimatch(\"bar.foo\", \"*.foo\"); // true!\nMinimatch.minimatch(\"bar.foo\", \"*.bar\"); // false!\nMinimatch.minimatch(\"bar.foo\", \"*.+(bar|foo)\", Minimatch.DEBUG); // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n- Brace Expansion\n- Extended glob matching\n- \"Globstar\" `**` matching\n\nSee:\n\n- `man sh`\n- `man bash`\n- `man 3 fnmatch`\n- `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instantiating the `Minimatch` class.\n\n```java\nMinimatch mm = new Minimatch(pattern, options);\n```\n\n### Instance Methods\n\n#### makeRe()\n\nGenerate the `Pattern` object if necessary, and return it. Will return `null` if the pattern is invalid.\n\n#### match(fname)\n\nReturn true if the filename matches the pattern, or false otherwise.\n\n### Static Methods\n\n#### Minimatch.minimatch(path, pattern, options)\n\nTests a path against the pattern using the options.\n\n```java\nboolean isJS = Minimatch.minimatch(file, \"*.js\", Minimatch.MATCH_BASE);\n```\n\n#### Minimatch.filter(pattern, options)\n\nReturns a function that tests its supplied argument, suitable for use with `Stream::filter`. Example:\n\n```java\nList\u003cString\u003e javascripts = fileList.stream().filter(\n  Minimatch.filter(\"*.js\", Minimatch.MATCH_BASE)\n).collect(Collectors.toList());\n```\n\n#### Minimatch.match(list, pattern, options)\n\nMatch against the list of files, in the style of fnmatch or glob. If nothing is matched, and\n`Minimatch.NO_NULL` is set, then return a list containing the pattern itself.\n\n```java\nList\u003cString\u003e javascripts = Minimatch.match(fileList, \"*.js\", Minimatch.MATCH_BASE);\n```\n\n#### Minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n### Options\n\nAll options are switched off by default.\n\n#### Minimatch.DEBUG\n\nDump a ton of stuff to stderr.\n\n#### Minimatch.NO_BRACE\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n#### Minimatch.NO_GLOBSTAR\n\nDisable `**` matching against multiple folder names.\n\n#### Minimatch.DOT\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n#### Minimatch.NO_EXT\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n#### Minimatch.NO_CASE\n\nPerform a case-insensitive match.\n\n#### Minimatch.NO_NULL\n\nWhen a match is not found by `Minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n#### Minimatch.MATCH_BASE\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n#### Minimatch.NO_COMMENT\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n#### Minimatch.NO_NEGATE\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n#### Minimatch.FLIP_NEGATE\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`NO_NEGATE` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `NO_COMMENT` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`NO_GLOBSTAR` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `NO_NULL` flag is set,\nthen `Minimatch.match` returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`Minimatch.match(new ArrayList\u003cString\u003e(), \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjshaptic%2Fminimatch-javaport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjshaptic%2Fminimatch-javaport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjshaptic%2Fminimatch-javaport/lists"}