Does rclone on OSX publish to FSEvents?

OSX uses FSEvents instead of inotify to pick up changes made to a drive’s files/folders from a remote source.

I have 2 PCs, 1 running OSX, 1 running Windows, both running an rclone mount.

I have noticed that if I add a new file/folder to the Windows mount:

  • It uploads to Gdrive
  • I can see the new file/folder in the OSX mount
  • But my OSX software that is monitoring FSEvents never receives a notification that a filesystem change has occurred.

Latest version of OSX Mojave, latest rclone beta, latest osxfuse.

I can start the debugging process of supplying logs, configs etc, but before I do I just thought I would check whether the FSEvents notification is actually implemented in rclone/fuse?

I searched online but only found some antiquated mentions of the need for osxfuse to implement this in much older versions.

I think what is happening is that the OSX rclone is polling Gdrive for changes every minute and updating it’s file/directory database with those changes, but that the changes do not then get pushed to the FSEvents service for publication to anything that is watching for FSEvents.

Sound right?

I’m not even sure that user space file systems (or rclone separately) can push to FSEvents?

I found this on the FUSE wiki which states that FUSE does not work with fsnotify on linux.

However there does now seem to be a low level interface to fuse which does support fsnotify

But it doesn’t look like OSXFUSE supports it, nor either of the go fuse libraries I use :frowning:

ok thx @ncw, will keep my eye on osxfuse release notes and hope that it gets introduced in future (and then in the Go libraries). Might be a bit of a wait… .

1 Like

hmmm, i found the fuse_lowlevel_notify_inval_entry() code in osxfuse github.

Also this post.

Does that mean it is now supported in osxfuse?

And is the InvalidateEntry() Go function here relevent?

I’m just keyword searching, so please excuse me if I am way off base with these!

That look useful. I missed that! I’ll take a look if I can get it to do something…

The docs for FUSE are quite poor and the don’t seem to be any docs for the kernel interface that I’ve found since nearly all the use is via libfuse…

yeah, the docs are pretty thin. it is hard to keep docs up to date on a fast evolving open source project. you do an excellent job with that on rclone. makes the whole project so much more accessible for the general population.

1 Like

I made an issue to have a go with this :slight_smile:

Ok great, I will monitor that thread and help with testing etc.