djberg96
3/8/2005 9:54:00 PM
gga wrote:
> On linux:
> require 'etc'
> uid = Etc::getpwnam(username).uid
>
> this works fine, but on windows, this fails miserably. Is there a
> platform independent way of getting the uid for any username (so as
to
> later use that uid against File::Stat.uid)?
require "win32/etc"
include Win32
uid = Etc.getpwnam(username).uid
Regards,
Dan
PS - Keep an eye out for the sys-admin package, coming soon.
PS2 - I plan on redefining File.stat in the win32-file package.