Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dozmus/iterators
A collection of iterators and related utilities for Java.
https://github.com/dozmus/iterators
Last synced: about 5 hours ago
JSON representation
A collection of iterators and related utilities for Java.
- Host: GitHub
- URL: https://github.com/dozmus/iterators
- Owner: dozmus
- License: mit
- Created: 2018-06-16T17:54:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T09:58:34.000Z (over 6 years ago)
- Last Synced: 2023-08-23T03:43:33.393Z (about 1 year ago)
- Language: Java
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
iterators
========A collection of iterators and related utilities for Java, provided under the MIT license.
| Iterator | Purpose |
|---|---|
| DirectoryFileIterator | Iterates over a directory, recursively or otherwise. |
| FilterableIterator | Iterates over a directory, with a filter. |
| ConcurrentIterator | A wrapper for an Iterator to provide thread-safe operations on it. |
| VCSRepositoryIterator | Each subclass of this iterates over tracked files in a version control repository system. This includes support for Git, Mercurial, and Subversion. |# Creating a custom ignore file
You can create your own ignore file, like the `.gitignore` file using `IgnoreFile`.1. Parse the ignore file using `IgnoreFile.read(baseDirectory, ignoreFile)`.
`baseDirectory` is folder the ignore file is being applied to.
2. Apply the rules using a `FilterableIterator`, which passes each file it may iterate over to `IgnoreFile.ignored(file, rules)`.