Re: Getting the name of the current user
Re: Getting the name of the current user
- Subject: Re: Getting the name of the current user
- From: "Erik M. Buck" <email@hidden>
- Date: Thu, 30 Aug 2001 22:11:46 -0500
NSUserName(), NSHomeDirectory(), NSHomeDirectoryForUser()
SUMMARY Get information about a user
DECLARED IN foundation/NSPathUtilities.h
SYNOPSIS NSString *NSUserName(void)
NSString *NSHomeDirectory(void)
NSString *NSHomeDirectoryForUser(NSString * userName)
DESCRIPTION NSUserName returns the name of the current user.
NSHomeDirectory returns a path to the current user's home directory.
NSHomeDirectoryForUser returns a path to the home directory for the
user specified by userName.
For once I will not say RTFM because this was actually hard to find.
I had to get it from the NexTStep 3.3 documentation because it is missing
from FoundationFunctions in the Cocoa documentation. I tried NSUserName()
and NSHomeDirectory() them. They still work.