RxFileMonitor icon indicating copy to clipboard operation
RxFileMonitor copied to clipboard

make use of FSEvent event pairs to interpret events

Open DivineDominion opened this issue 8 years ago • 0 comments

File modifications from TextEdit produce this log output:

texteditfile.txt changed (isFile, renamed, finderInfoModified, xattrsModified)
texteditfile.txt.sb-56afa5c6-SOiDRl changed (isFile, renamed)
texteditfile.txt changed (isFile, renamed, finderInfoModified, inodeMetaModified, xattrsModified)
texteditfile.txt.sb-56afa5c6-SOiDRl changed (isFile, modified, removed, renamed, changeOwner)

At the moment (1.0.2), each of these events is forwarded to the callback independently. But the originate in pairs. This extra information could be useful to interpret events in 2 ways:

  1. Either in the lib itself, reducing 2 renamed events to a single renamed from ... to ...
  2. In the client, when we forward not single events but the original pairs, too

Both ways enable us to interpret

texteditfile.txt changed (isFile, renamed, finderInfoModified, xattrsModified)
texteditfile.txt.sb-56afa5c6-SOiDRl changed (isFile, renamed)

... as "texteditfile.txt is renamed to texteditfile.txt.sb-56afa5c6-SOiDRl".

DivineDominion avatar Apr 26 '17 06:04 DivineDominion