mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Add INotifyHandler to make notify more flexible
This commit is contained in:
parent
1bf43bf0a3
commit
8c937d6126
8 changed files with 277 additions and 20 deletions
|
|
@ -290,14 +290,13 @@ class NativeShare extends AbstractShare {
|
|||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param callable $callback callable which will be called for each received change
|
||||
* @return mixed
|
||||
* @return INotifyHandler
|
||||
*/
|
||||
public function notify($path, callable $callback) {
|
||||
public function notify($path) {
|
||||
// php-smbclient does support notify (https://github.com/eduardok/libsmbclient-php/issues/29)
|
||||
// so we use the smbclient based backend for this
|
||||
$share = new Share($this->server, $this->getName());
|
||||
$share->notify($path, $callback);
|
||||
return $share->notify($path);
|
||||
}
|
||||
|
||||
public function __destruct() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue