lua-users home
lua-l archive

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


MessagePhilip Plumlee wrote:

> If the script were C:/foo/bar.pl, then $^ might return
> C:/foo/ or C:/foo/bar.pl.

The zeroth element of the global table 'arg' will contain
the scriptname, but not necessarily in absolute form.  (Lua
is written in pure ANSI C, which has no concept of
directories.)  If you want anything fancier than this, you
have to either roll your own (with os.execute, for instance)
or use the lposix library:

<http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/>

-- 
Aaron