• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File Permissions - NSFileManager Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >File Permissions - NSFileManager Swift (From: Arved von Brasch <email@hidden>)
 >Re: File Permissions - NSFileManager Swift (From: Jens Alfke <email@hidden>)
 >Re: File Permissions - NSFileManager Swift (From: Arved von Brasch <email@hidden>)

  • Prev by Date: Re: Window Update Problem
  • Next by Date: UITextFieldDelegate
  • Previous by thread: Re: File Permissions - NSFileManager Swift
  • Next by thread: Subclassing a Subclass of SBApplication
  • Index(es):
    • Date
    • Thread