Monitors changes in a directory.
Syntax:
Parameters:
Returns:
Returns 1 if the operation is successful; otherwise the operation returns zero.
Remarks
Changes occurring in the directory are reported back to the client via events. The event types returned are listed under Directory Change Event ID. For more on events please see the topic under Events.
The following changes are detected in the directory (or optionally subdirectory):
- Renaming, creating, or deleting a file name.
- Creating or deleting a directory (and/or subdirectory).
- Any attribute change in the watched directory (and/or subdirectory).
- File-size changes.
- Any change to the last write-time of files.
Detection in the changes occur only when the change is recorded to disk. If disk caching is enabled, the change is detected when the cache is flushed to disk.
Example 1. Start monitoring "C:\TEMP" directory
Dim oFileSystem As Fredi.ediFileSystem
' Get file system object.
Set oFileSystem = m_oEdiDoc.GetFileSystem
oFileSystem.NotifyDirectoryChange "C:\TEMP", False
Example 2. Stop monitoring directory
Dim oFileSystem As Fredi.ediFileSystem
' Get file system object.
Set oFileSystem = m_oEdiDoc.GetFileSystem
oFileSystem.NotifyDirectoryChange "", False
Samples