1

Similar to Last Date Opened across different HD Formats ?

I've used the code in the link provided ... Write extend file attributes swift example

When listing Extended Attributes on Mac OS Extended Journaled I get "com.apple.lastuseddate#PS" which I can use but only on Mac OS, I tried FAT but didn't find anything similar attribute.

Swifty
  • 839
  • 2
  • 15
  • 40
espr3ss0
  • 33
  • 1
  • 3

1 Answers1

0

Neither extended attributes nor a "last opened" time are universally supported across all filesystems, so I don't believe there's a consistent way to do this. However, you might have better luck with the "last access" time using stat() (in the st_atime field) or getattrlist() (by requesting ATTR_CMN_ACCTIME).

James Bucanek
  • 3,299
  • 3
  • 14
  • 30