stec.sfc.Win32
Interface FileSystemChangeHandler
public interface FileSystemChangeHandler
Interface that must be implemented by file system change handler.
The following Win32 implementation limitations and irregularities affect change notifications:
- multiple notifications maybe issued when a file or directory being monitored is changed. For example a file size change normally results in 5 FILE_NAME notifications and 2 DIRECTORY_NAME notifications.
- different Windows implementation generate different number of change notifications for changes to files and directories being monitored.
- change notifications maybe lost if too much time is spent processing change notifications. If change notification processing will take a long time, it is best for the handler to simply queue the change notification and for another thread to process the change notification.
- change notifications provides very little information. All a change notification really says is that a file or folder being monitored has changed. The exact name of the file that has changed nor the exact change that occurred is known. Because of this limitation most change notification handler implementations capture and maintain an image of the files and directories being monitored and use this image to compare against the current state of the file system when a change notification occurs to determine the exact file name that was changed and the exact change that has occurred.
- change notifications for changes to last accessed may not occur when the file or directory being monitored is last accessed, but may occur as a single change notification or maybe reported as late as an hour later. These limitations occur because the file system is not updated immediately, but at a later time, as much as an hour later. Often multiple updates to the same file or directory are combined.
- not all processes monitoring for changes in the file system maybe notified of changes to the file system when a remote user is accessing a file or directory being monitored.
- when a remote client posts a large number of changes to the file system, deadlocks in the network Redirector may delay change notifications.
- Since:
- 1.2.0 12/03/2002
fileSystemChanged
void fileSystemChanged(FileSystemChangeNotification change_notification)
- Called by the associated FileSystemChangeListener when a monitored FileSystemChangeNotification occurs.
- Parameters:
change_notification
- the FileSystemChangeNotification that occured.- See Also:
FileSystemChangeListener
,
FileSystemChangeNotification
Copyright © 2001-2005 Servertec. All rights reserved.