Function binPaths

System paths where executable files can be found.

Prototype

auto std.algorithm.iteration.__T12FilterResultS3914findexecutable8binPathsFNeZ9__lambda2TS3std9algorithm9iteration38__T8splitterVAyaa6_61203d3d2062TAyaTaZ8splitterFAyaaZ6ResultZ.FilterResult binPaths() @trusted;

Returns

Range of non-empty paths as determined by PATH environment variable.

Note

this function does not cache its result

Example

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"]));
}

Authors

Roman Chistokhodov

Copyright

Roman Chistokhodov 2016

License

Boost License 1.0.