diff options
Diffstat (limited to 'epan/wslua/template-init.lua')
-rw-r--r-- | epan/wslua/template-init.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/wslua/template-init.lua b/epan/wslua/template-init.lua index e6ec4ae9ae..74380263d9 100644 --- a/epan/wslua/template-init.lua +++ b/epan/wslua/template-init.lua @@ -64,6 +64,11 @@ function typeof(obj) return mt and mt.__typeof or type(obj) end +function file_exists(name) + local f = io.open(name,"r") + if f ~= nil then io.close(f) return true else return false end +end + -- %WTAP_ENCAPS% -- %WTAP_FILETYPES% |