| Home | Libraries | People | FAQ | More

## 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 so search, defaults to "PATH" environment variable.

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