lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


"debug.getinfo(1, "S").source" is probably what you are looking for.

The robustness depends on the environment. You don't even need a file system for running Lua.

Regards,
    Daniel

Am Di., 21. Jan. 2020 um 08:20 Uhr schrieb Hongyi Zhao <hongyi.zhao@gmail.com>:
Hi,

Is there any robust and convenient methods for me to obtain the lua
script's (absolute/real) dirname and file name from within the script
itself?

Regards
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493