• 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: Cannot set date of a symlink using FSSetCatalogInfo()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot set date of a symlink using FSSetCatalogInfo()?


  • Subject: Re: Cannot set date of a symlink using FSSetCatalogInfo()?
  • From: James Bucanek <email@hidden>
  • Date: Tue, 21 Mar 2006 07:29:30 -0700

Sorry, this was supposed to go to the Carbon-Dev list.

That's what you get for trying to track down bugs late at night.

James


James Bucanek wrote on Monday, March 20, 2006:

>Here's my conundrum:
>
>I'm writing a document archiving and backup utility and I'm having some difficulty restoring symbolic link files.
>Here's the problem.
>
>(1) I create a plain file and write the contents of the symbolic link.
>
>(2) As long as the file is a regular file, I can use FSSetCatalogInfo to change it's permissions, modification
>date, etc.
>
>(3) As per bug 2796751, I then use FSpSetFInfo() to change the file to a symbolic link by setting it's type/creator
>to 'slnk'/'rhap'.
>
>(4) Once it is a symbolic link[1], I can no longer use FSSetCatalogInfo() to set its modification or creation
>dates. I can, however, use FSSetCatalogInfo() to set other aspects of the file, such as its owner and group IDs.
>
>The kicker is that FSpSetFInfo() touches the file! If I set the file's modification and creation date in step 2, it
>works. But as soon as I change it into a symlink its modification date gets changed to today and I can't set it
>anymore.
>
>Is this a know bug? Does anyone know of a workaround?
>
>[1] I also ran into another bug/oddity: Once you chage a file into a symlink, the FSRef for the file is no longer
>usable for much of anything. The solution is to generate a new FSRef for the file following the call to
>FSpSetFInfo().
>
--
James Bucanek
 _______________________________________________
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

References: 
 >Cannot set date of a symlink using FSSetCatalogInfo()? (From: James Bucanek <email@hidden>)

  • Prev by Date: What's wrong with NSViewAnimation and view with zero height or width ?
  • Next by Date: Re: NSTask and authentication...I have to clarify my original question
  • Previous by thread: Cannot set date of a symlink using FSSetCatalogInfo()?
  • Next by thread: Intercepting messages
  • Index(es):
    • Date
    • Thread