From: mathew Date: 2005-12-22T14:59:38+09:00 Subject: Re: getpasswd Bertram Scharpf wrote: >I would have written a path but I'm not sure how this >problem is solved best. > I think the ideal thing would be to define an OS-independent object-oriented API, and then implement it for both Windows and Unixes. Make sure it implements Enumerable, of course. Then you could do things like DirectoryServices.users.each {|u| puts u.name } Over time it could be extended to LDAP, NIS, ... I noticed the, ah, less-than-Ruby-like interface to Etc while I was documenting it. I considered hacking on it to at least make it return Arrays rather than have a non-reentrant "each call returns a new value" API, but I decided it would be better to hold out for something more ideal... mathew