add basic smb notify support

at the moment this only works when using the smbclient based backend
This commit is contained in:
Robin Appelman 2016-04-25 18:15:34 +02:00
commit cf23de2702
4 changed files with 56 additions and 2 deletions

View file

@ -8,6 +8,17 @@
namespace Icewind\SMB;
interface IShare {
// https://msdn.microsoft.com/en-us/library/dn392331.aspx
const NOTIFY_ADDED = 1;
const NOTIFY_REMOVED = 2;
const NOTIFY_MODIFIED = 3;
const NOTIFY_RENAMED_OLD = 4;
const NOTIFY_RENAMED_NEW = 5;
const NOTIFY_ADDED_STREAM = 6;
const NOTIFY_REMOVED_STREAM = 7;
const NOTIFY_MODIFIED_STREAM = 8;
const NOTIFY_REMOVED_BY_DELETE = 9;
/**
* Get the name of the share
*
@ -131,4 +142,11 @@ interface IShare {
* @return mixed
*/
public function setMode($path, $mode);
/**
* @param string $path
* @param callable $callback callable which will be called for each received change
* @return mixed
*/
public function notify($path, callable $callback);
}