base/utils/dir.zeek

Dir
Namespace

Dir

Imports

base/frameworks/reporter, base/utils/exec.zeek, base/utils/paths.zeek

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.

Parameters
  • 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.