[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to get the directory of the current executed file?
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 14 Jan 2011 08:28:46 +0200
On Fri, Jan 14, 2011 at 8:26 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> The lfs module from LuaFileSystem is the best known method:
Nah, scratch that - sorry I have not had my tea.
You can look at arg[0] for the script name, and work from there.
Or get the debug information:
function script_path()
-- remember to strip off the starting @
return debug.getinfo(2, "S").source:sub(2)
end
print(script_path())
steve d.