[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to query current path from a library?
- From: Jorge <xxopxe@...>
- Date: Mon, 22 Feb 2010 16:58:58 -0200
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! :)
Jorge