• 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
NSWorkSpace performFileOperation (a)synchronousness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWorkSpace performFileOperation (a)synchronousness


  • Subject: NSWorkSpace performFileOperation (a)synchronousness
  • From: Aandi Inston <email@hidden>
  • Date: Thu, 05 Mar 2015 10:36:41 +0000

 have a requirement to copy files from my Mac OS app. I find:
success=[NSWorkSpace performFileOperation:NSWorkSpaceCopyOperation
 source:nsstring*  // source directory path
 destination:nsstring* // target directory path
 file:nsarray* // nsstring array containing short paths of files or
directories
 tag:nsinteger* // on return, <0 on failure, 0 if sync finish, >0 if async
]
My question relates to asynchronousness (is that a word)? It looks like a
synchronous method as it returns a success or failure. But the documentation
says of the tag variable "a positive integer if the operation was performed
asynchronously. If the value is a positive integer, the value is a tag that
identifies the requested file operation." This confuses me. The examples
I've
seen don't do anything special with the tag.

I may be just missing a document giving a context to this...

Its in the past tense.  If it said "has been started asynchronously" of
course I
would be looking for a method to wait for completion.

So what does "was performed asychronously" mean?
Do I need to care? In what sense was it asynchronous if my API is waiting
for completion? What is the requested file operation identifier and what API
might I use it with? Do I need to release it?

Thanks in advance
_______________________________________________

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: NSWorkSpace performFileOperation (a)synchronousness
      • From: Jens Alfke <email@hidden>
  • Prev by Date: NSMenuWillSendActionNotification doesn't deliver menu item like the docs say it does
  • Next by Date: Re: NSWorkSpace performFileOperation (a)synchronousness
  • Previous by thread: NSMenuWillSendActionNotification doesn't deliver menu item like the docs say it does
  • Next by thread: Re: NSWorkSpace performFileOperation (a)synchronousness
  • Index(es):
    • Date
    • Thread