Re: $HOME not set?
Re: $HOME not set?
- Subject: Re: $HOME not set?
- From: William Bumgarner <email@hidden>
- Date: Thu, 30 Mar 2006 23:43:07 -0800
On Mar 30, 2006, at 8:08 PM, Paul J. Lucas wrote:
Is it ever possible that $HOME not be set for a user? If so,
how?
Generally, no, it will always be set. But, as with all environment
variables, it may have been modified, unset, or otherwise futzed with
for no apparent reason. Unix is like that. There is always a
reason, it just may not be apparent (or good).
If you have an alternative source for said bit o' information, then
use it.
I remember reading somewhere that there's a Cocoa method
someplace to get the user's home directory, but I can't seem to
find it. Any pointer?
NSHomeDirectory(). Not exactly a method, but the result is an NSString.
http://tinyurl.com/n3ncn
Or NSHomeDirectoryForUser().
b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden