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:
Daniel Xu
2016-07-05 22:40:25 -07:00
committed by Justin M. Keyes
parent bd6dad06dd
commit 5f1a153831
16 changed files with 93 additions and 73 deletions

View File

@@ -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.