• 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: ATTR_CMN_CHGTIME
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ATTR_CMN_CHGTIME


  • Subject: Re: ATTR_CMN_CHGTIME
  • From: "James W. Walker" <email@hidden>
  • Date: Sun, 21 Mar 2010 17:28:24 -0700

On Mar 21, 2010, at 4:20 PM, Ron Fleckner wrote:

> On 22/03/2010, at 10:01 AM, gMail.com wrote:
>
>> Hi,
>> I cannot find a Cocoa API to set the "Attribute Modification Date" of a
>> file. If there is a way, may you please let me know?
>>
>> In the meantime, on MacOS X 10.5.8, I have been trying to use setattrlist
>> with ATTR_CMN_CHGTIME, unsuccessfully. And setattrlist  returns 0, as
>> everything went ok. While it is not ok. Even FSSetCatalogInfo with
>> kFSCatInfoAttrMod doesn't work. I get the current date/time I call the API,
>> not the date/time I have set.
>>
>> So my question is:
>> Can I really set the ATTR_CMN_CHGTIME on MacOS X 10.5.8 or higher?
>>
>> Also, the man says that getattrlist and setattrlist don't work on all the
>> volumes. So, how can I know whether I can call these APIs?
>>
>>
>> Thanks
>> --
>> Leonardo
>
> the Cocoa way, I suppose, is to use NSFileManager.  Looks like you can use setAttributes:ofItemAtPath:error: with an NSDate value for NSFileModificationDate.


He's asking for the attribute modification date, not the (content) modification date attribute.  That is, the last time the attributes of the file were changed, without necessarily changing the contents of the file.


_______________________________________________

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: ATTR_CMN_CHGTIME
      • From: Ron Fleckner <email@hidden>
References: 
 >ATTR_CMN_CHGTIME (From: "gMail.com" <email@hidden>)
 >Re: ATTR_CMN_CHGTIME (From: Ron Fleckner <email@hidden>)

  • Prev by Date: Re: NSPredicate to exclude specific elements??
  • Next by Date: Re: Save As core data question
  • Previous by thread: Re: ATTR_CMN_CHGTIME
  • Next by thread: Re: ATTR_CMN_CHGTIME
  • Index(es):
    • Date
    • Thread