dofile – load and execute a Lua file
result = dofile(filename)
This looks for the given filename
in the current directory (i.e. the directory containing the currently executing Lua script). If it is not found, then the file is looked for in the "root" directory of the current package instead.
Assuming the file is found, it is then loaded and executed as a Lua chunk.
dofile
returns any value(s) that are returned by the loaded chunk.
If the given file is not found, an error is raised.
If the loaded chunk raises any errors, then these errors are propagated by the dofile
call.