Dir
¶Namespace: | Dir |
---|---|
Imports: | base/frameworks/reporter, base/utils/exec.bro, base/utils/paths.bro |
Source File: | /scripts/base/utils/dir.bro |
Dir::polling_interval : interval &redef |
The default interval this module checks for files in directories when
using the Dir::monitor function. |
Dir::monitor : function |
Register a directory to monitor with a callback that is called every time a previously unseen file is seen. |
Dir::polling_interval
¶Type: | interval |
---|---|
Attributes: | &redef |
Default: | 30.0 secs |
The default interval this module checks for files in directories when
using the Dir::monitor
function.
Dir::monitor
¶Type: | function (dir: string , callback: function (fname: string ) : void , poll_interval: interval &default = Dir::polling_interval &optional ) : void |
---|
Register a directory to monitor with a callback that is called every time a previously unseen file is seen. If a file is deleted and seen to be gone, then the file is available for being seen again in the future.
Dir: | The directory to monitor for files. |
---|---|
Callback: | Callback that gets executed with each file name that is found. Filenames are provided with the full path. |
Poll_interval: | An interval at which to check for new files. |