Skip to content

tamada/diranger

Repository files navigation

diranger

License Version

🗣️ Description

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.

🏃 Usage

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.

⚓ Download

Gradle

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'
  // ...
}

Maven

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>

Module

flowchart LR
  java.base 
  diranger[jp.cafebabe.diranger] 
  slf4j[org.slf4j]
  
  slf4j ---> java.base
  diranger ---> java.base
  diranger ---> slf4j
Loading

📦 Dependencies

This product contains org.eclipse.jgit.ignore.IgnoreNode class and its dependent classes (a part of jgit).

😄 About

📜 License

MIT License

  • Permissions
    • 👍 Commercial use
    • 👍 Modification
    • 👍 Distribution
    • 👍 Private use
  • Limitations
    • ❌ Liability
    • ❌ Warranty

🎩 Project Logo

This is the logo of diranger.

logo

This image is from iconscout.com.

📛 Project Name

The project name diranger shows the directory ranger from its feature.

👨‍💼 Developers 👩‍💼

Releases

No releases published

Packages

No packages published

Languages