Re: File Permissions - NSFileManager Swift
Re: File Permissions - NSFileManager Swift
- Subject: Re: File Permissions - NSFileManager Swift
- From: Jens Alfke <email@hidden>
- Date: Tue, 30 Jun 2015 11:30:18 -0700
> On Jun 30, 2015, at 6:26 AM, Arved von Brasch <email@hidden> wrote:
>
> Thank you for replying. I was reporting the error I got back from the NSError, which doesn’t give much detail.
Every NSError has an error domain and code, which is what I was asking for. Often there’s other useful metadata in the userInfo dictionary. From the debugger the “po” command will output a description of the error.
> drwxrwxrwx+ 2 arved staff 68 30 Jun 15:13 Test.app
Those are just the attributes of the app directory itself. There’s probably some file inside there that can’t be deleted; you’ll have to use -R (or is it -r?) to recurse.
> So, how do I change the permissions on the application (or any generic file) to have permission to delete it?
The system call removexattr, probably. See the man page.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden