FuncDoodle
Loading...
Searching...
No Matches
ExePath.h File Reference

Cross-platform utility for retrieving the current executable path. More...

#include <vector>

Go to the source code of this file.

Namespaces

namespace  ExePath

Functions

const char * ExePath::Get ()
 Returns the full path to the currently running executable.

Detailed Description

Cross-platform utility for retrieving the current executable path.

This header defines a small utility namespace that provides a function for obtaining the full filesystem path of the running executable.

Platform support:

  • Windows: GetModuleFileNameA
  • macOS: _NSGetExecutablePath
  • Linux: readlink("/proc/self/exe")
Note
Internally uses a static buffer resized as needed on macOS.
Warning
The returned pointer is to a static buffer and may be overwritten on subsequent calls.
Not thread-safe due to shared static storage.