gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSUserDirectory ... was Re: (no subject)


From: Richard Frith-Macdonald
Subject: NSUserDirectory ... was Re: (no subject)
Date: Tue, 6 Mar 2007 11:27:14 +0000


On 6 Mar 2007, at 11:24, Nicola Pero wrote:

Yup ... I see what you mean.  I did a quick search on the internet
and found that NSUserDirectory returns /Network/Users with
the Network domain mask, /Users with the User domain mask, and
nothing with the other ones.

Hmmm.

Interpreted in this way, 'NSUserDirectory' is not very useful as a concept, because eg in Unix systems users can have their directory anywhere on disk. While most "normal" users will have /home/xxx as their home directories, that's
not necessarily always the case (just think of root).

I agree ... it's not an idea I'd want to base my code on (I guess you can use NSHomeDirectoryForUser() in most cases). Presumably the idea is that you can iterate through the subdirectories of these paths to find all the 'normal' user directories. I've never needed to do that.

Anyway I suppose in our implementation we just let people specify in their filesystem layout a 'location of user home directories' (by default, /home), store it in all the various config files, and have it returned for the combination
of NSUserDirectory/LocalDomain ?

Do we need to bother with a different location for the network domain, or
with a different location for each domain ?

For consistency I guess we should ... presumably it's not much more effort to do that. The whole thing is really for MacOS-X compatibility though, so i think we must at least support the user and network domains.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]