binPaths

System paths where executable files can be found.

@trusted nothrow
binPaths
()

Return Value

Type: auto

Range of non-empty paths as determined by PATH environment variable. Note: This function does not cache its result

Examples

auto pathGuard = EnvGuard("PATH");
version(Windows) {
    environment["PATH"] = ".;C:\\Windows\\system32;C:\\Program Files";
    assert(equal(binPaths(), [".", "C:\\Windows\\system32", "C:\\Program Files"]));
} else {
    environment["PATH"] = ".:/usr/apps:/usr/local/apps:";
    assert(equal(binPaths(), [".", "/usr/apps", "/usr/local/apps"]));
}

Meta