[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to get the directory of the current executed file?
- From: Tang Daogang <daogangtang@...>
- Date: Fri, 14 Jan 2011 14:33:19 +0800
It's not my opinion.
What I want to know is to get the current EXCUTED file's directory, not the current process' directory. For example:
I am in /root/web/, when I do:
require 'abc.def'The ./abc/def.lua will print /root/web/abc/, rather than /root/web/ .
Do I describe it clearly?
On Fri, Jan 14, 2011 at 2:26 PM, steve donovan <email@example.com>
The lfs module from LuaFileSystem is the best known method:
On Fri, Jan 14, 2011 at 8:14 AM, Tang Daogang <firstname.lastname@example.org
> But I don't know how to get it in Lua, any suggestion?
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> = lfs.currentdir()