[MORE} startAccessingSecurityScopedResource
[MORE} startAccessingSecurityScopedResource
- Subject: [MORE} startAccessingSecurityScopedResource
- From: koko <email@hidden>
- Date: Tue, 21 Jan 2014 19:46:12 -0700
I believe I should use contentsOfDirectoryAtURL and then create a security-scoped bookmark for each file I am interested in and in this manner I will be able to read the files across launches of the app.
Do I understand this correctly?
-koko
On Jan 21, 2014, at 7:26 PM, koko <email@hidden> wrote:
> In the code snippet below is it possible to read the files whose names are in the NSArray contents?
>
>
> if ( [url startAccessingSecurityScopedResource] )
> {
> NSFileManager *defaultManager = [NSFileManager defaultManager];
> NSArray *contents = [defaultManager contentsOfDirectoryAtPath:[url path] error:&error];
> [url stopAccessingSecurityScopedResource];
> }
>
>
> -koko
> _______________________________________________
>
> 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
_______________________________________________
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