lua-users home
lua-l archive

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

On Mon, 2010-02-22 at 17:57 +0000, Peter Cawley wrote:
> In most cases, placing the following in a .lua file outside of any
> function should get the directory which the file is placed in:
> local path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]]

Thanks Peter and PA, that was fast. 
So i got to the point where i need to use the debug library! Whooho! I'm
a pro! :)