Re: FSCopyObjectAsync: useless and crippled
Re: FSCopyObjectAsync: useless and crippled
- Subject: Re: FSCopyObjectAsync: useless and crippled
- From: James Bucanek <email@hidden>
- Date: Fri, 13 May 2005 08:33:40 -0700
Steve Gehrman wrote on Thursday, May 12, 2005:
>I created code that uses these new copy routines (FSCopyObjectAsync),
>and they work, but they seem to be over simplified and crippled.
>
>For example, If I'm trying to copy a file that I don't have read
>permission for, The API needs to ask the user for the Admin password,
>or at least give my app the opportunity to handle this case.
You want FSCopyObject to pop-up a dialog and ask the user to authenticate a copy of a file they don't have permission to read? Then switch to privileged execution mode if it needs to? Automatically?
That's insane. You can't have low-level file APIs popping up interactive user windows or escalating privileges for a process. If you don't have permission to access a file, and you have to go through the authentication framework to gain authorization to do so, then that is *your* responsibility to take those steps -- not FSCopyObject's.
>Currently, I only see two modes. Fail on any error, or just skip any
>files that are not copyable. These two modes are completely useless
>for a real world app.
>
>At last years WWDC they said these were the same routines used by the
>Finder. That doesn't seem possible unless I'm missing something.
I'm sure the Finder either intercepts any error returned by the call and takes appropriate steps, or (my guess) it determines the readability of the files before it even attempts the copy. It's easy to do with FSGetCatalogInfo.
Irregardless, this is a Carbon question and you should probably ask on the Carbon list.
--
James Bucanek <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden