3 #include <msp/strings/format.h>
5 #include "stat_private.h"
10 void Stat::Private::fill_owner_info(Stat::OwnerInfo &result)
14 if(owner_id!=INVALID_UID)
18 if(!getpwuid_r(owner_id, &pw, buf, sizeof(buf), &owner) && owner)
19 result.owner = owner->pw_name;
21 result.owner = format("%d", owner_id);
24 result.owner = "None";
26 if(group_id!=INVALID_GID)
30 if(!getgrgid_r(group_id, &gr, buf, sizeof(buf), &group) && group)
31 result.group = group->gr_name;
33 result.group = format("%d", group_id);
36 result.group = "None";