Re: NSUserDirectory ... was Re: (no subject)

2007-03-06 Thread Tim McIntosh

On Mar 6, 2007, at 5:27 AM, Richard Frith-Macdonald wrote:

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.


I could also imagine using this to populate a list of default home  
directory locations in a user account creation program.


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev


RE: NSUserDirectory ... was Re: (no subject)

2007-03-06 Thread Nicola Pero
For NSUserDirectory we probably only need System, Network and Local -- the User 
domain 
would not make sense as it would mean you can put user's directories in your 
own user directory. :-/

(Mac OS X has only got Network and Local)

OK, I'll add them now.

Thanks



___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev


NSUserDirectory ... was Re: (no subject)

2007-03-06 Thread Richard Frith-Macdonald


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.





___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev