Reputation: 138
I have this code that I use to create a directory, but I want it to be able to go into anyone's folder, obviously. For example instead of ksmith I'd want it to find someone's jlaw. Is there something in objective c that does that?
strcpy(applicationPath, "/Users/ksmith/ApplicationCode");
strcpy(filesPath, "/Users/ksmith/ApplicationData");
Upvotes: 0
Views: 46
Reputation: 12129
You can retrieve the path to the current user’s home directory with the function
NSHomeDirectory()
For more information and related functions: Apple Documentation.
Upvotes: 2