java-filesearch

java filesearch reimagined

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Search Прикладные библиотеки
Группа

Группа

io.github.codejanovic
Идентификатор

Идентификатор

java-filesearch
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

java-filesearch
java filesearch reimagined
Ссылка на сайт

Ссылка на сайт

https://github.com/codejanovic/java-filesearch
Система контроля версий

Система контроля версий

https://github.com/codejanovic/java-filesearch.git

Скачать java-filesearch

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.codejanovic/java-filesearch/ -->
<dependency>
    <groupId>io.github.codejanovic</groupId>
    <artifactId>java-filesearch</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.codejanovic/java-filesearch/
implementation 'io.github.codejanovic:java-filesearch:0.1.0'
// https://jarcasting.com/artifacts/io.github.codejanovic/java-filesearch/
implementation ("io.github.codejanovic:java-filesearch:0.1.0")
'io.github.codejanovic:java-filesearch:jar:0.1.0'
<dependency org="io.github.codejanovic" name="java-filesearch" rev="0.1.0">
  <artifact name="java-filesearch" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.codejanovic', module='java-filesearch', version='0.1.0')
)
libraryDependencies += "io.github.codejanovic" % "java-filesearch" % "0.1.0"
[io.github.codejanovic/java-filesearch "0.1.0"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.assertj : assertj-core jar 3.4.1

Модули Проекта

Данный проект не имеет модулей.

Build Status Coverage Status License

java-filesearch

Java filesearch reimagined.

Maven

Release artifact

<dependency>
    <groupId>io.github.codejanovic</groupId>
    <artifactId>java-filesearch</artifactId>
    <version>0.1.0</version>
</dependency>

Snapshot artifact

<dependency>
    <groupId>io.github.codejanovic</groupId>
    <artifactId>java-filesearch</artifactId>
    <version>0.2.0-SNAPSHOT</version>
</dependency>

Motivation

This is just a fun project to reimplement the horrible file walking implementation from the JDK, trying to combine the two Java APIs of File.listFiles() and Files.walkFileTree() into a new API using Java's new Stream<T> feature of version 8.

To search for files simply start with the static method Search.search() and search for executable (.exe) files ...

... not recursively using the Path API

    import static io.github.codejanovic.java.filesearch.Search.search;

    public void doSomeFileSearchStuff() {
        final List<Path> executables = search().directory("S:\Earch\Path").notRecursively().byPath()
            .stream()
            .filter(p -> p.getFileName().toString().endsWith(".exe"))            
            .collect(Collectors.toList()); 
        // do something with found files
    }

... or recursively using the Path API

    import static io.github.codejanovic.java.filesearch.Search.search;

    public void doSomeFileSearchStuff() {
        final List<Path> executables = search().directory("S:\Earch\Path").recursively().byPath()
            .stream()
            .filter(p -> p.getFileName().toString().endsWith(".exe"))            
            .collect(Collectors.toList()); 
        // do something with found files
    }

... or not recursively using the File API

    import static io.github.codejanovic.java.filesearch.Search.search;

    public void doSomeFileSearchStuff() {
        final List<File> executables = search().directory("S:\Earch\Path").notRecursively().byFile()
            .stream()
            .filter(f -> f.getName().endsWith(".exe"))            
            .collect(Collectors.toList()); 
        // do something with found files
    }

... or recursively using the File API

    import static io.github.codejanovic.java.filesearch.Search.search;

     public void doSomeFileSearchStuff() {
            final List<File> executables = search().directory("S:\Earch\Path").recursively().byFile()
                .stream()
                .filter(f -> f.getName().endsWith(".exe"))            
                .collect(Collectors.toList()); 
            // do something with found files
    }

Версии библиотеки

Версия
0.1.0