• 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: set modification date of symlink
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set modification date of symlink


  • Subject: Re: set modification date of symlink
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 20 Jul 2007 20:29:23 +0200


On 20 Jul 2007, at 15:29, Alastair Houghton wrote:

On 20 Jul 2007, at 11:13, Gerriet M. Denkmann wrote:

I am trying to set the modification date of a symbolic link.

It seems that [NSFileManager changeFileAttributes:atPath:] traverses through symbolic links (although this is NOT mentioned in the documentation).

man symlink(7) says: "The [...] modification time of an existing symbolic link can be changed by means of the lutimes(2) system call [...]."
But there is no man lutimes(2) and lutimes() is NOT defined in <sys/time.h>.
Using lutimes() creates an undefined symbol error while linking.


So: How to set the modification date of symlink?

setattrlist() should work, on volumes that support it.

Yes, it should work. But it seems not to work.
I wrote a small tool to set the creation time using setattrlist() - it works as expected for regular files and directories, it does nothing (not even some error message) for symbolic links.


Kind regards,

Gerriet.


_______________________________________________

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: set modification date of symlink
      • From: Chris Suter <email@hidden>
References: 
 >set modification date of symlink (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: set modification date of symlink (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: how to print attributed strings to output (using NSLog? or otherwise)
  • Next by Date: Re: NSArrayController content array vs arrangedObject
  • Previous by thread: Re: set modification date of symlink
  • Next by thread: Re: set modification date of symlink
  • Index(es):
    • Date
    • Thread