NSHomeDirectoryForUser
指定したユーザーのホームディレクトリを返します
NSString* NSHomeDirectoryForUser ( NSString * userName );
解説
ユーザー(userName)のホームディレクトリを返します。
userNameは正式名ではなくて、Login名
返り値
引数
( NSString * )userName
フレームワーク
Foundation
クラス
NSHomeDirectoryForUser
Function
使用可能
10.0
参照
NSFullUserName
NSUserName
NSHomeDirectory
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSLog([NSString stringWithFormat:@"%@",NSHomeDirectoryForUser(@"userName")]); } @end