package org.implab.gradle.common.core.os;

import java.io.File;
import java.util.Optional;

public interface OperatingSystem {

    public static final String WINDOWS_FAMILY = "windows";

    public static final String LINUX_FAMILY = "linux";

    public static final String FREE_BSD_FAMILY = "freebsd";

    public static final String MAC_OS_FAMILY = "os x";

    public static final String UNKNOWN_FAMILY = "unknown";

    String family();

    String name();

    String version();

    Optional<File> which(String cmd);

    Optional<File> which(String cmd, Iterable<? extends File> paths);

    public static OperatingSystem current() {
        return SystemResolver.current();
    }
}
