fileinfo: implement os_fileinfo_hardlinks

This commit is contained in:
Stefan Hoffmann
2014-08-08 16:53:03 +02:00
parent aa378acdf5
commit e85fe0957d
3 changed files with 26 additions and 3 deletions

View File

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