aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/fs.c
diff options
context:
space:
mode:
authorStefan Hoffmann <stefan991@gmail.com>2014-08-08 16:53:03 +0200
committerStefan Hoffmann <stefan991@gmail.com>2014-08-31 15:22:38 +0200
commite85fe0957d40080f43cbfcbe9eb8864475325b09 (patch)
tree092fff1b7ebe4fe394216cae67c3340473dcace2 /src/nvim/os/fs.c
parentaa378acdf51daf235c7e721cfa646d115d8708f0 (diff)
downloadrneovim-e85fe0957d40080f43cbfcbe9eb8864475325b09.tar.gz
rneovim-e85fe0957d40080f43cbfcbe9eb8864475325b09.tar.bz2
rneovim-e85fe0957d40080f43cbfcbe9eb8864475325b09.zip
fileinfo: implement os_fileinfo_hardlinks
Diffstat (limited to 'src/nvim/os/fs.c')
-rw-r--r--src/nvim/os/fs.c9
1 files changed, 9 insertions, 0 deletions
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.