binPaths

System paths where executable files can be found.

@trusted
binPaths
()

Return Value

Type: auto

Range of paths as determined by PATH environment variable. Note: this function does not cache its result

Examples

static if (isFreedesktop) {
    import xdgpaths;
    import std.algorithm : equal;

    auto pathGuard = EnvGuard("PATH");

    environment["PATH"] = ".:/usr/apps:/usr/local/apps:";
    assert(equal(binPaths(), [".", "/usr/apps", "/usr/local/apps"]));
}

Meta