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/, then $^ might return
> C:/foo/ or C:/foo/

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: