diff options
Diffstat (limited to 'src/nvim/os/fs.c')
-rw-r--r-- | src/nvim/os/fs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 3c821936e9..4aa727733e 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -192,6 +192,18 @@ int os_nodetype(const char *name) return nodetype; } +/// Gets the absolute path of the currently running executable. +/// +/// @param[out] buffer Returns the path string. +/// @param[in] size Size of `buffer`. +/// +/// @return `0` on success, or libuv error code on failure. +int os_exepath(char *buffer, size_t *size) + FUNC_ATTR_NONNULL_ALL +{ + return uv_exepath(buffer, size); +} + /// Checks if the given path represents an executable file. /// /// @param[in] name Name of the executable. |