The newish smbc_readdirplus API introduced a new struct libsmb_file_info which kind of replaces struct stat with something more smb-centric. It'd make a lot of sense to also have stat()-like API returning a libsmb_file_info to complement the dir iteration API. In KDE's KIO SMB tech we have a listDir() and a stat() function. They work with smbc_readdirplus2() and smbc_stat() respectively. Since stats are translated into KIO's cross-platform equivalent of a stat, both functions need to convert smbc's output. Currently that conversion code is shared and works on the struct stat data being the common denominator. If there was a stat()-like API returning libsmb_file_info instead we could get away from all use of struct stat and simply use struct libsmb_file_info as the go-to format for talking about entries. Which then means we can use smbc_readdirplus() instead of smbc_readdirplus2(). e.g. something like int smbc_file_info(const char *url, struct libsmb_file_info *info);