From 6d2f9f10139725c01b689cabcf0e32a8e3fc0e9c Mon Sep 17 00:00:00 2001 From: "krystian.panek" Date: Mon, 15 Jan 2018 07:29:14 +0100 Subject: [PATCH] Docs update --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c1fbdd7..329dbd3 100644 --- a/README.md +++ b/README.md @@ -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)) {