Re: How to query current path from a library?
[
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: 2010年2月22日 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