From e85fe0957d40080f43cbfcbe9eb8864475325b09 Mon Sep 17 00:00:00 2001 From: Stefan Hoffmann Date: Fri, 8 Aug 2014 16:53:03 +0200 Subject: fileinfo: implement os_fileinfo_hardlinks --- src/nvim/os/fs.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/os') diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 9347afb9bc..70a53edb1c 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -403,6 +403,15 @@ off_t os_fileinfo_size(const FileInfo *file_info) return file_info->stat.st_size; } +/// Get the number of hardlinks from a `FileInfo`. +/// +/// @return number of hardlinks. +uint64_t os_fileinfo_hardlinks(const FileInfo *file_info) + FUNC_ATTR_NONNULL_ALL +{ + return file_info->stat.st_nlink; +} + /// Get the `FileID` for a given path /// /// @param path Path to the file. -- cgit