From 9ee1c3604c0cc8a3ec1bac32fb33e9c0d0887155 Mon Sep 17 00:00:00 2001 From: Stefan Hoffmann Date: Sat, 9 Aug 2014 14:59:52 +0200 Subject: fileinfo: implement os_fileinfo_blocksize --- 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 70a53edb1c..71e8a55c0e 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -412,6 +412,15 @@ uint64_t os_fileinfo_hardlinks(const FileInfo *file_info) return file_info->stat.st_nlink; } +/// Get the blocksize from a `FileInfo`. +/// +/// @return blocksize in bytes. +uint64_t os_fileinfo_blocksize(const FileInfo *file_info) + FUNC_ATTR_NONNULL_ALL +{ + return file_info->stat.st_blksize; +} + /// Get the `FileID` for a given path /// /// @param path Path to the file. -- cgit