• 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: FSCopyObjectAsync: useless and crippled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSCopyObjectAsync: useless and crippled


  • Subject: Re: FSCopyObjectAsync: useless and crippled
  • From: Steve Gehrman <email@hidden>
  • Date: Fri, 13 May 2005 20:58:37 -0700


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?

Yes. Why not? Isn't OS X a modern operating system? Why should it be so difficult?


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.


What the difference? Either I write an API from scratch, or Apple provides an API. Either way the outcome is the same. The problem is that for a modern OS, copying a file should be easy. What's insane is that the Apple APIs are so pathetic. I can't believe someone actually got paid to design and write such crap.


The API could and should launch it's own setuid tool and handle all the communication and pass info to the app. If the app doesn't want user interaction, then the app can turn it off. Just like the alias resolving APIs. There are options for "no user interaction"


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.

Yeah, easy to do, I've written all the code that does this already. But these are brand new APIs, just released in Tiger. I had hoped that they would work as promised. The problem with these APIs is that there is no way to intercept errors. It's all or nothing. And there are completely unusable except for the simplest of cases.


Irregardless, this is a Carbon question and you should probably ask on the Carbon list.

Yeah, and get more non-answers.

--
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
  • Follow-Ups:
    • Re: FSCopyObjectAsync: useless and crippled
      • From: Greg Hurrell <email@hidden>
    • Re: FSCopyObjectAsync: useless and crippled
      • From: James Bucanek <email@hidden>
    • Re: FSCopyObjectAsync: useless and crippled
      • From: email@hidden
References: 
 >Re: FSCopyObjectAsync: useless and crippled (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: NSMailDelivery
  • Next by Date: Re: NSOutlineViews and C++ objects
  • Previous by thread: Re: FSCopyObjectAsync: useless and crippled
  • Next by thread: Re: FSCopyObjectAsync: useless and crippled
  • Index(es):
    • Date
    • Thread