Get the path to the current executable.

Synopsis

Declared in <folly/io/FsUtil.h>

path
executable_path();

Description

Note that this is not reliable and not recommended in general; it may not be implemented on your platform (in which case it will throw), the executable might have been moved or replaced while running, and applications comprising of multiple executables should use some form of configuration system to find the other executables rather than relying on relative paths from one to another.

So this should only be used for tests, logging, or other innocuous purposes.

Return Value

The path to the current executable.

Created with MrDocs