Get containing path of lua file

后端 未结 10 1934
粉色の甜心
粉色の甜心 2021-02-12 12:00

I am wondering if there is a way of getting the path to the currently executing lua script file?

This is specifically not the current working directory, which could be

10条回答
  •  时光说笑
    2021-02-12 12:03

    If the Lua script is being run by the standard command line interpreter, then try arg[0].

提交回复
热议问题