• 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: NSDocument save incremental file package in-place
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument save incremental file package in-place


  • Subject: Re: NSDocument save incremental file package in-place
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 02 Mar 2014 09:09:35 +0000

On 2 Mar 2014, at 00:40, Trygve Inda <email@hidden> wrote:

>>
>> On 1 Mar 2014, at 23:26, Trygve Inda <email@hidden> wrote:
>>
>>> I have a top level FileWrapper which contains the wrappers for all my files.
>>> Is there any sample code that would help me figure out the right way to do
>>> this?
>>>
>>> [NSFileWrapper writeToURL:options:originalContentsURL:error:]
>>>
>>> Seems to call my method to get the top level fileWrapper.
>>>
>>> When I set a breakpoint, I see the writeToURL is a temp folder and the
>>> originalContentsURL is indeed the file package on disk.
>>>
>>> So why isn't it hard linking?
>>
>> Hmmm, what are options flags there as well?
>>
>>
>
> A follow up...
>
> Adding this to my NSDocument subclass:
>
> - (BOOL)writeToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName
> forSaveOperation:(NSSaveOperationType)saveOperation
> originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError
> **)outError
> {
>    NSError* error;
>
> NSFileWrapper* myFileWrapper = [self fileWrapperOfType:@"MyPackageType"
> error:&error];
>
> [myFileWrapper writeToURL:absoluteURL
> options:NSFileWrapperWritingWithNameUpdating
> originalContentsURL:absoluteOriginalContentsURL error:&error];
>
>    return (YES);
> }
>
>
> This still takes 40 seconds

Alright, I’m running low on ideas now. But if you can make a sample project that exhibits the issue, I’ll cheerfully take a look at that.


_______________________________________________

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


  • Follow-Ups:
    • Re: NSDocument save incremental file package in-place
      • From: Trygve Inda <email@hidden>
References: 
 >Re: NSDocument save incremental file package in-place (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Auto center within a custom NSView
  • Next by Date: Re: NSDocument save incremental file package in-place
  • Previous by thread: Re: NSDocument save incremental file package in-place
  • Next by thread: Re: NSDocument save incremental file package in-place
  • Index(es):
    • Date
    • Thread