From f355d97b3e5d60825ad9560b10b2ebe430126034 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Fri, 20 Sep 2019 20:38:17 -0400 Subject: [PATCH] Implement NSFileAccessIntent --- Source/NSFileCoordinator.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/NSFileCoordinator.m b/Source/NSFileCoordinator.m index a14506f12..fa66b7968 100644 --- a/Source/NSFileCoordinator.m +++ b/Source/NSFileCoordinator.m @@ -46,18 +46,23 @@ NSFileAccessIntent *result = [[self alloc] init]; ASSIGNCOPY(result->_url, url); result->_options = options; - return nil; + result->_isRead = YES; + return result; } + (instancetype) writingIntentWithURL: (NSURL *)url options: (NSFileCoordinatorWritingOptions)options { - return nil; + NSFileAccessIntent *result = [[self alloc] init]; + ASSIGNCOPY(result->_url, url); + result->_options = options; + result->_isRead = NO; + return result; } - (NSURL *) URL { - return nil; + return _url; } @end