Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Change user path xcode mac

Hello, I have a code that deletes a file but I want to change the path so that other people can use it to. The path now is with my name "damianvandekauter".


[[NSFileManagerdefaultManager] removeItemAtPath:@"/Users/damianvandekauter/Documents/Pezani/Telenet.zip"error:nil];

So can I change that path to for example: /Users/user/Documents/Pezani/Telenet.zip or something else?

Posted on Feb 27, 2015 10:45 AM

Reply
Question marked as Best reply

Posted on Feb 27, 2015 11:14 AM

Sure, you can change to to whatever you like.


<edit>

If you are asking if you can substitute in the word user in the path to stand in place of your name and have to go to another users home folder then the answer is no.


You can make the path point to any valid user path on the system however.

3 replies
Question marked as Best reply

Feb 27, 2015 11:14 AM in response to TikaSoftware

Sure, you can change to to whatever you like.


<edit>

If you are asking if you can substitute in the word user in the path to stand in place of your name and have to go to another users home folder then the answer is no.


You can make the path point to any valid user path on the system however.

Change user path xcode mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.