Sending kevent notifications to notify network events to applications

83 views
Skip to first unread message

Philippe Liard

unread,
Sep 4, 2015, 5:28:08 PM9/4/15
to OSXFUSE
Hi,

I'm working on a network file system using OSXFUSE and I see that Finder doesn't refresh its content when my file system invalidates inodes after some operations affecting those inodes happened remotely. I believe Finder uses kevent() to watch the file system and that notifications get properly delivered for file system operations that happen locally (e.g. 'touch' in a terminal). I was wondering however if there was any way to make my file system generate such notifications (e.g. NOTE_DELETE, NOTE_ATTRIB...) when processing network events?

I found on this forum mentions of the following Objective-C API but it now seems to be deprecated and I couldn't find any equivalent unfortunately (but would love to be wrong):
[[NSWorkspace sharedWorkspace] noteFileSystemChanged:changedFilePath];

Also I would like ideally to solve this problem globally, i.e. not only for Finder although many/most applications on OSX do rely on Finder.

Thank you,
Philippe.

Shiping Tan

unread,
Aug 1, 2016, 11:51:27 PM8/1/16
to OSXFUSE
now, is it slove? 

在 2015年9月5日星期六 UTC+8上午5:28:08,Philippe Liard写道:

s...@nan.co.uk

unread,
Aug 4, 2016, 3:11:39 AM8/4/16
to OSXFUSE


On Friday, September 4, 2015 at 10:28:08 PM UTC+1, Philippe Liard wrote:
I found on this forum mentions of the following Objective-C API but it now seems to be deprecated and I couldn't find any equivalent unfortunately (but would love to be wrong):
[[NSWorkspace sharedWorkspace] noteFileSystemChanged:changedFilePath];

This isn't deprecated even in the 10.12 SDK; I think you're confusing it with FNNotifyByPath, which has been deprecated. Also in another thread in this group Ben wrote:

In case your user space file system daemon is aware of external changes you can call function fuse_purge_np to notify the kernel of those external changes. In this case there should be no need to disable any kernel side cache.
 
Reply all
Reply to author
Forward
0 new messages