[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Ability to get dofile path?
- From: Asko Kauppi <asko.kauppi@...>
- Date: Sun, 22 Jun 2003 18:09:03 +0300
Is there any way from within a .lua file to know its current path (or
This would be very handy in situations where a 'library' of lua code is
stored into several source files. Now i'm forced to keep all in one,
since otherwise the caller would need to provide not only the pathname,
but also the path separately:
dofile( SC_PATH.."sc_main.lua" )
If dofile arguments (passing arg etc. as for functions) is ever
going to be included in Lua, it might be a good idea to have
arg.filename (or arg?) for the full pathname?