Open icewind1991 opened 9 years ago
hmm, ok, I will try to take a look at this soon, a bit busy this week as I will move next week.
smbc_notify
was added to libsmbclient.h on June 26, 2015. I wonder how it should be implemented for PHP, since the notifications come asynchronously through callbacks. You'd have to register a PHP callback function with the library.
I think such callback make sense in long running process (CLI), not really in web env.
Well, it would be nice if it kept the notifications on a queue for later consumption (with a configurable timeout, etc), but that means more code in samba :P What options do we have ?
Well, PHP can also be (ab)used as a tool to write CLI programs/daemons, so adding notify support is not totally crazy. I just wonder how hard it is to hook into the PHP event loop and issue a callback. It's certainly something that I have no experience with.
Notice: the pecl/inotify ext use the "queue" way
The smbclient
notify
command allows clients to get notified whenever a file or folder is changed on the server.From what I can tell this functionality is exposed as
smbc_setFunctionNotify
in libsmbclient in newer versions of smbclient