objective c - Detect old file name and new file name via FSEventsFramework -


i using fseventsframework monitor directories changes. wondering if logic here sound, detecting old file name , new name after rename.

  • i think on rename, both events in same callback.
  • old file name have event id x-1
  • new file name have id x

is true?

thanks

as far experienced it, assumption not true. on fseventstreamcreate pass latency flag meaning of latency kfseventstreamcreateflagnodefer. therefore events may or may not come in same callback. furthermore there different ways file can renamed. filesystem-apis rename file while keeping inode mv, others nsdocument create new inode. receive kfseventstreameventflagitemrenamed in callback, not.

edit: alternatives fsevents kernel queues , nsfilecoordinator

fsevents somehow not documented in api-docs. have @ header file fsevent.h, there more read there.

then see going on rename, run app , renaming finder, terminal mv in document based app using small triangle right filename.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -