Skip to content

Commit

Permalink
Docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian.panek committed Jan 15, 2018
1 parent ef94d84 commit 6d2f9f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@

## Description

It is a reusable wrapper for file exclusion mechanism extracted from [NetBeans Git Module](https://github.com/myabc/nbgit/tree/master/src/org/nbgit/util/exclude).
It is a reusable Java wrapper for [GitIgnore](https://git-scm.com/docs/gitignore) file exclusion mechanism extracted from [NetBeans Git Module](https://github.com/myabc/nbgit/tree/master/src/org/nbgit/util/exclude).

Useful for Java applications or libraries which wants to use GitIgnore like file filtering.

Supports nested *.gitignore* files.

## Usage

Sample Kotlin code:

```kotlin
val rootDir = File("/some/root")
val sampleFile = File("SomeClass.class", rootDir)
val sampleFile = File("class/SomeClass.class", rootDir)
val gitIgnore = GitIgnore(rootDir)

if (gitIgnore.isExcluded(sampleFile)) {
Expand Down

0 comments on commit 6d2f9f1

Please sign in to comment.