• 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
Need File information
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need File information


  • Subject: Need File information
  • From: Poonam <email@hidden>
  • Date: Fri, 5 Jun 2009 13:09:41 +0530

Hi all,
 
I am working on a Carbon application.
Need to extract the File modification date of the files that I am opening in my application.
 
For the same, I use the following code snippet:
 
FSCatalogInfo catInfo;
OSErr err = FSGetCatalogInfo (&fsRef, kFSCatInfoContentMod, &catInfo, NULL, NULL, NULL);
 
if (noErr == err)
{
    UTCDateTime dateTime = catInfo.contentModDate;
    LocalDateTime ldt;
    ConvertUTCToLocalDateTime(&dateTime, &ldt);
}
 
The date/time (in ldt) which I get here has a huge difference (in months), with what I see when I do Get Info of the file in the Finder.
 
I also tried with the creation Date (replacing kFSCatInfoContentMod with kFSCatInfoCreateDate and contentModDate with createDate), but again with same results.
 
Am I using the right API here.
Can someone help me out in this case?
(Note: fsRef is the file reference which is correct)
 
regards
 
 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need File information
      • From: Quinn <email@hidden>
  • Next by Date: How to mount a range of block on a disk as a partition
  • Next by thread: Re: Need File information
  • Index(es):
    • Date
    • Thread