diff options
Diffstat (limited to 'src/os/os.h')
-rw-r--r-- | src/os/os.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/os.h b/src/os/os.h index 96164a59f5..ff21a95f3a 100644 --- a/src/os/os.h +++ b/src/os/os.h @@ -21,6 +21,16 @@ int os_dirname(char_u *buf, size_t len); /// @return `true` if `fname` is a directory. bool os_isdir(const char_u *name); +/// Check if the given path represents an executable file. +/// +/// @return `true` if `name` is executable and +/// - can be found in $PATH, +/// - is relative to current dir or +/// - is absolute. +/// +/// @return `false` otherwise. +bool os_can_exe(const char_u *name); + /// Get the file permissions for a given file. /// /// @return `-1` when `name` doesn't exist. |