Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the FSEvent flag kFSEventStreamEventFlagItemInodeMetaMod mean?

Tags:

macos

fsevents

When will the flag kFSEventStreamEventFlagItemInodeMetaMod be set? In Apple's developer documentation it says the value is:

kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400

but it doesn't explain when it's set.

Thanks!

like image 973
Sharon L. Avatar asked May 15 '13 14:05

Sharon L.


1 Answers

That flag is one of the many flags that can be passed to your FSEventStreamCallback function:

  kFSEventStreamEventFlagItemCreated = 0x00000100,
  kFSEventStreamEventFlagItemRemoved = 0x00000200,
  kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400,
  kFSEventStreamEventFlagItemRenamed = 0x00000800,
  kFSEventStreamEventFlagItemModified = 0x00001000,
  kFSEventStreamEventFlagItemFinderInfoMod = 0x00002000,
  kFSEventStreamEventFlagItemChangeOwner = 0x00004000,
  kFSEventStreamEventFlagItemXattrMod = 0x00008000,
  kFSEventStreamEventFlagItemIsFile = 0x00010000,
  kFSEventStreamEventFlagItemIsDir = 0x00020000,
  kFSEventStreamEventFlagItemIsSymlink = 0x00040000

And this is a callback that's called when file system (FS) events occur.

Interesting enough, even the FSEvents.h file doesn't provide any useful elaboration on these event flags. But presumably the callback is called when an item is created, or removed, or renamed, or modified, etc.

Now, about iNodes:

Inodes are a unique ID that the Macintosh file system uses to track files. If the inode number associated with a file is changed or in some way modified, I presume that is when your callback is called with "kFSEventStreamEventFlagItemInodeMetaMod".

like image 76
Michael Dautermann Avatar answered Oct 23 '22 00:10

Michael Dautermann