getgrgid() for Posix
Justin Whear
justin at economicmodeling.com
Tue May 8 09:48:48 PDT 2012
On Tue, 08 May 2012 18:45:29 +0200, mta`chrono wrote:
> Am 08.05.2012 18:26, schrieb useo6:
>> Hi everyone,
>>
>> does anyone know how I can the name of a group in Posix? In C/C++ I can
>> use getgrgid(), but I just found nothing like this function. Is there
>> any alternative to get the name of a group of a file?
>>
>> Thanks in advance!
>
> Yes that true, it's neither in phobos nor in druntime. Why not using the
> C Method? Just declare it as extern(C) and use it ;-).
I too searched and failed to find it. stat_t (defined in
core.sys.posix.stat.d) has a st_gid field which you could use, but simply
defining with extern(C) seems to be a better idea.
More information about the Digitalmars-d-learn
mailing list