• 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
Playground gets permission error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Playground gets permission error


  • Subject: Playground gets permission error
  • From: Rick Mann <email@hidden>
  • Date: Fri, 30 Sep 2016 17:56:05 -0700

I'm testing some code I wrote to set the isExcludedFromBackup flag on a URL. I tried putting the code into a playground to test various uses of it. But when it goes to set the flag, it gets an error:

Error setting isExcludedFromBackup: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “test” in the folder “rmann”." UserInfo={NSURLUnsetValueKeysKey=(
    NSURLIsExcludedFromBackupKey
), NSURL=file:///Users/rmann/test/, NSFilePath=/Users/rmann/test, NSUnderlyingError=0x60000005f7d0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

The code is basically:

    var vals = URLResourceValues()
    vals.isExcludedFromBackup = true
    try url.setResourceValues(vals)

The folder I'm setting it on is in my home directory.

It's an iOS playground.

Any ideas? Thanks.

--
Rick Mann
email@hidden



_______________________________________________

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


  • Prev by Date: Re: Mystery Threads
  • Previous by thread: Re: Cocoa-dev Digest, Vol 13, Issue 415
  • Index(es):
    • Date
    • Thread