https://github.com/shyiko/klob
A .gitgnore-pattern-based glob library for Kotlin and/or Java 8+
https://github.com/shyiko/klob
Last synced: about 1 month ago
JSON representation
A .gitgnore-pattern-based glob library for Kotlin and/or Java 8+
- Host: GitHub
- URL: https://github.com/shyiko/klob
- Owner: shyiko
- Created: 2017-07-21T06:52:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T18:45:49.000Z (over 4 years ago)
- Last Synced: 2023-07-26T22:07:45.282Z (almost 2 years ago)
- Language: Kotlin
- Size: 60.5 KB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# klob [](https://travis-ci.org/shyiko/klob) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.shyiko.klob%22%20AND%20a%3A%22klob%22)
![]()
A [.gitgnore](https://git-scm.com/docs/gitignore#_pattern_format)-pattern-based glob library for Kotlin and/or Java 8+.
Used by/Extracted from [ktlint](https://github.com/shyiko/ktlint).## Usage
```xml
com.github.shyiko.klob
klob
0.2.0
kalvanized```
> (java)
```java
# find all files matching the patterns (! = exclude)
Path path = Glob.from("src/**/*.kt", "!src/generated")
.iterate(Paths.get("."))
/*: Iterator */
.next()# match directories only
String home = System.getProperty("user.home")
Path path = Glob.from(".IntelliJIdea*/config")
.iterate(Paths.get(home), Glob.IterationOption.SKIP_CHILDREN, Glob.IterationOption.DIRECTORY)
/*: Iterator */
.next()
```## Development
```sh
git clone https://github.com/shyiko/klob && cd klob
./mvnw # shows how to build, test, etc. project
```## Legal
All code, unless specified otherwise, is licensed under the [MIT](https://opensource.org/licenses/MIT) license.
Copyright (c) 2017 Stanley Shyiko.