[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Obtain the lua script's (absolute/real) dirname and file name from within the script itself.
- From: Hongyi Zhao <hongyi.zhao@...>
- Date: Tue, 21 Jan 2020 23:05:39 +0800
Daniel Roßberg <danielmrossberg@gmail.com> 于2020年1月21日周二 下午8:03写道:
>
> "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.
What do mean by saying that ``You don't even need a file system for
running Lua.''? Could you please give a more concrete example for
this case?
>
> 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
>>
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493