Skip to content
/ whicher Public

Kotlin library providing 'which's functionality to the java world

License

Notifications You must be signed in to change notification settings

Drako/whicher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whicher

Maven Central license

which -- locate a program file in the user's path

This class basically does what the which program does.

Usage

Kotlin

import guru.drako.utils.which.Whicher

// in some fun:
val location = Whicher.which("foo")
// location contains path to foo executable (e.g. "/usr/bin/foo")
// which returns a Path?, so null is returned when the executable is not found

Java

import guru.drako.utils.which.Whicher;
import java.nio.Path;

// in some function:
final Path location = Whicher.system.which("foo");
// location contains path to foo executable (e.g. "/usr/bin/foo")
// which returns null when the executable is not found

The Whicher does not depend on the which program and might do some things differently.

Setup

Maven

<dependency>
    <groupId>guru.drako.utils</groupId>
    <artifactId>whicher</artifactId>
    <version>1.2</version>
</dependency>

Gradle

dependencies {
    compile 'guru.drako.utils:whicher:1.2'
}

Build/Test Status

Branch Travis CI Status AppVeyor Status
develop Build Status Build status
master Build Status Build status

About

Kotlin library providing 'which's functionality to the java world

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages