O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Path Utilities

These functions are used to get filesystem paths to common files and directories such as the current user’s home directory. NSFullUserName is used to obtain the long username of the current username, while NSUserName returns a user’s short username.

NSFullUserName

NSString *NSFullUserName(void)

NSHomeDirectory

NSString *NSHomeDirectory(void)

NSHomeDirectoryForUser

NSString *NSHomeDirectoryForUser(NSString *userName)

NSOpenStepRootDirectory

NSString *NSOpenStepRootDirectory(void)

NSSearchPathForDirectoriesInDomains

NSArray *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde)

NSTemporaryDirectory

NSString *NSTemporaryDirectory(void)

NSUserName

NSString *NSUserName(void)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required