base/utils/dir.bro

Dir
Namespace:Dir
Imports:base/frameworks/reporter, base/utils/exec.bro, base/utils/paths.bro
Source File:/scripts/base/utils/dir.bro

Summary

Runtime Options

Dir::polling_interval: interval &redef The default interval this module checks for files in directories when using the Dir::monitor function.

Functions

Dir::monitor: function Register a directory to monitor with a callback that is called every time a previously unseen file is seen.

Detailed Interface

Runtime Options

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.

Functions

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.
Copyright 2016, The Bro Project. Last updated on December 19, 2018. Created using Sphinx 1.8.2.