Giter VIP home page Giter VIP logo

files-jvm's Introduction

Files - JVM

A repository of tools for working with Files on the JVM (Java Virtual Machine).

Getting Started

Each Module is available as an independent downloadable package that can be quickly imported using the GitHub Maven package registry.

You can import any module into your project using Gradle or maven.

Here is how to implement a package using Gradle:

  1. Add this to your dependencies block: implementation "io.github.dk96-os.files-jvm:visitors:$package_version"

  2. Add the GitHub packages maven repository.

Visitors Module

The concept of a File Visitor is built into the Java Standard Library. For more information on the Java Standard Library, see: java.nio.file.FileVisitor

Directory Visitor

The more important class in the Visitors module is the Directory Visitor. This class requires a Path to be given in the constructor. The path should be a valid directory, otherwise the isValidDirectory flag will be false, and all methods will return empty lists.

When the given Path is a valid directory, a Simplified File Visitor is created that collects the names of files and subdirectories that are the direct descendants (only one level deep). The names are stored for the lifetime of the Directory Visitor, and can be accessed as a list of Files, or a list of Directories. There are convenient methods available that can map the names into Lists of Path objects.

Simplified File Visitor

Within the Visitors module, you will also find a Simplified File Visitor. This is an abstract class that provides reasonable default method implementations for most of the required FileVisitor methods. It is intended to make other classes in the Visitor Module easier to read by applying the default method implementations for FileVisitor.

files-jvm's People

Contributors

dk96-os avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.