mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
os/fs: Rename os_file_exists to os_path_exists (#4973)
Because the old name did not indicate that the function would return true on directories as well.
This commit is contained in:

committed by
Justin M. Keyes

parent
bd6dad06dd
commit
5f1a153831
@@ -599,14 +599,14 @@ int os_fchown(int fd, uv_uid_t owner, uv_gid_t group)
|
||||
return r;
|
||||
}
|
||||
|
||||
/// Check if a file exists.
|
||||
/// Check if a path exists.
|
||||
///
|
||||
/// @return `true` if `name` exists.
|
||||
bool os_file_exists(const char_u *name)
|
||||
/// @return `true` if `path` exists
|
||||
bool os_path_exists(const char_u *path)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
uv_stat_t statbuf;
|
||||
return os_stat((char *)name, &statbuf) == kLibuvSuccess;
|
||||
return os_stat((char *)path, &statbuf) == kLibuvSuccess;
|
||||
}
|
||||
|
||||
/// Check if a file is readable.
|
||||
|
Reference in New Issue
Block a user