lua-users home
lua-l archive

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


There is a LUA_API function named luaL_searchpath. This does all the work.
A trivial act to expose it as a Lua function.

DB



On Thu, 3 Feb 2005 19:05:59 +1030, Peter Loveday <peter@eyeonline.com> wrote:
> >I think your problem is solved in 5.1
> > IF you replace the dofile() with a loadfile().
> > In 5.1 work4 loadfile() uses the package.path to load the script just
> > as require does. Hence, EOP.
> > Hopefully, in 5.1 dofile will have similar behaviour to loadfile(). Which
> > would
> > also be end of problem.
> 
> Does this solve the problem for locating other (non-lua) files relative to
> my package also, or only other .lua ones?
> 
> Say I want to load a .jpg file that I bundle with my package, for whaterver
> reason, can I use this method in 5.1 to do this?
> 
> If not, then the problem still exists...
> 
> Love, Light and Peace,
> - Peter Loveday
> Director of Development, eyeon Software
> 
>