[jcifs] Can JCIFS subscribe to a file change modification from SMB?

Michael B Allen ioplex at gmail.com
Wed Nov 14 09:51:20 MST 2012


On Thu, Oct 11, 2012 at 3:39 PM, rickbliss <rick.blss at gmail.com> wrote:
> It looks as though SMB supports a notification event when a directory is
> changed [http://msdn.microsoft.com/en-us/library/ee380523(prot.20).aspx] ;
> however, i am having diffuculty implementing this with JCIFS.  i dont want
> to store an array and poll for changes, i would think that JCIFS could
> subscribe , or recognize a change event?  Please help.

Hi Rick,

JCIFS does not implement the file change event part of the protocol.

But it does have a pretty good MS-RPC framework under the hood that
users have been successful in using to implement new functionality.
You could add a method like
SmbFile.addNotifyHandler(FileChangeHandler) and then call-back if
something changes and so on. Look at jcifs.smb.SID.getServerSid as a
good self-contained starting point for making an MS-RPC call. If you
do the work, please post a patch.

Also look in the patches directory to make sure someone has not
already submitted the work.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list