mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
16 lines
479 B
Text
16 lines
479 B
Text
##! Rudimentary functions for helping with Zeek packages.
|
|
|
|
## Checks whether @load of a given package name could
|
|
## be successful.
|
|
##
|
|
## This tests for the existence of corresponding script files
|
|
## in ZEEKPATH. It does not attempt to parse and validate
|
|
## any actual Zeek script code.
|
|
##
|
|
## path: The filename, package or path to test.
|
|
##
|
|
## Returns: T if the given filename, package or path may load.
|
|
function can_load(p: string): bool
|
|
{
|
|
return find_in_zeekpath(p) != "";
|
|
}
|