How to get the current user name?

Cocoa :
NSUserName();

C :
int userid = geteuid();
struct passwd *userst= getpwuid(userid);
userst->pw_name;

Blogged with the Flock Browser

Tags: , , , , , ,

Advertisements
Posted in COcoa, MAc. 1 Comment »