digitalmars.D.learn - getgrgid() for Posix
- useo6 <nomail dontknowmymail.com> May 08 2012
- mta`chrono <chrono mta-international.net> May 08 2012
- Justin Whear <justin economicmodeling.com> May 08 2012
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
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
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.
May 08 2012








Justin Whear <justin economicmodeling.com>