View mode: basic / threaded / horizontal-split · Log in · Help
May 08, 2012
getgrgid() for Posix
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!
May 08, 2012
Re: getgrgid() for Posix
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 ;-).
May 08, 2012
Re: getgrgid() for Posix
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.
Top | Discussion index | About this forum | D home