This product provides an API for traversing directories. The features of this API are:
- Skip symbolic links,
- Skip hidden files, and
- Respect
.gitignore
files.
It also supports standard Java iterators: Iterator
, Iterable
, Stream
, and List
.
var ranger = new RangerBuilder().build();
ranger.stream(Path.of("target/directory"), new Config())
.forEach(System.out::println);
In this example, the stream skips symbolic links and hidden files and respects .gitignore
files.
With other parameters, use Config.Builder
for building Config
object.
Copy and paste the following snippet into your build.gradle
.
repository {
mavenCentral()
maven {
url "https://tamada.github.io/maven"
}
}
dependencies {
// ...
implementation group: 'jp.cafebabe', name: 'diranger', version: '1.0.0'
// ...
}
Copy and paste the following snippet into your pom.xml
.
<repositories>
<repository>
<id>tamada.maven.github</id>
<name>Maven repository of Tamada on GitHub</name>
<url>https://tamada.github.io/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>jp.cafebabe</groupId>
<artifactId>diranger</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
flowchart LR
java.base
diranger[jp.cafebabe.diranger]
slf4j[org.slf4j]
slf4j ---> java.base
diranger ---> java.base
diranger ---> slf4j
This product contains org.eclipse.jgit.ignore.IgnoreNode
class and its dependent classes (a part of jgit
).
MIT License
- Permissions
- 👍 Commercial use
- 👍 Modification
- 👍 Distribution
- 👍 Private use
- Limitations
- ❌ Liability
- ❌ Warranty
This is the logo of diranger
.
This image is from iconscout.com.
The project name diranger
shows the directory ranger from its feature.