Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 70123864ff.
PrevUpHomeNext

Function search_path

boost::process::search_path

Synopsis

// In header: <boost/process/search_path.hpp>


boost::filesystem::path 
search_path(const boost::filesystem::path & filename, 
            const std::vector< boost::filesystem::path > path = ::boost::this_process::path());

Description

Searches for an executable in path.

filename must be a basename including the file extension. It must not include any directory separators (like a slash). On Windows the file extension may be omitted. The function will then try the various file extensions for executables on Windows to find filename.

Parameters:

filename

The base of the filename to find

path

the set of paths to search, defaults to the "PATH" environment variable.

Returns:

the absolute path to the executable filename or an empty string if filename isn't found


PrevUpHomeNext