• 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: Changing file & directory names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing file & directory names


  • Subject: Re: Changing file & directory names
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 4 Jul 2006 12:07:40 -0400
  • Organization: Rogue Research

On 2006-07-01 21:21, Sherm Pendley said:

>> Also, I'm but confused by Sherm Pendley's mention of link and
>> unlink. I think he's assuming it is correct but needs a tortured
>> interpretation in order to reconcile it with our notion of what
>> should happen. Anyway, he's right that no copies are made.
>
>That was essentially my assumption, yes - I'd assumed that the docs
>were in some way correct, but written very badly, in a way that's
>easy to misinterpret. It hadn't occurred to me that they might be
>flat-out wrong - and I apologize to John Stiles for doubting him when
>he pointed out that they are.

I think with all this discussion of hardlinks and link and unlink, we
have overlooked the simple fact that Cocoa lacks an API to rename
files!  Yes, yes, movePath:toPath:handler: can be used, but if you look
at its docs (which we've been over carefully now) you'll see the word
'rename' appears nowhere.  And if one is not familiar with the (bizarre)
unix concept of 'moving' a file to rename it, then it's not at all clear
that this API can be used.  And if you search the Cocoa docs and even
the Cocoa headers for 'rename' you come up pretty dry.  This is quite
discouraging.

The CoreServices File Manager, on the other hand, has a very
straightforward API: FSRenameUnicode().

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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: Changing file & directory names
      • From: Andy Lee <email@hidden>
    • Re: Changing file & directory names
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >Changing file & directory names (From: Dean Snyder <email@hidden>)
 >Re: Changing file & directory names (From: Greg Titus <email@hidden>)
 >Re: Changing file & directory names (From: Dean Snyder <email@hidden>)
 >Re: Changing file & directory names (From: Sherm Pendley <email@hidden>)
 >Re: Changing file & directory names (From: Dean Snyder <email@hidden>)
 >Re: Changing file & directory names (From: Sherm Pendley <email@hidden>)
 >Re: Changing file & directory names (From: Dean Snyder <email@hidden>)
 >Re: Changing file & directory names (From: Sherm Pendley <email@hidden>)
 >Re: Changing file & directory names (From: Derrick Bass <email@hidden>)
 >Re: Changing file & directory names (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Why does my custom view grow in the wrong direction?
  • Next by Date: Re: Embended YouTube video
  • Previous by thread: Re: Changing file & directory names
  • Next by thread: Re: Changing file & directory names
  • Index(es):
    • Date
    • Thread