Playground gets permission error
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