[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem in accessing relative filenames | C-API
- From: Wesley Smith <wesley.hoke@...>
- Date: Tue, 31 May 2011 12:04:39 -0700
>> package.path is used by require but not by luaL_loadfile and luaL_dofile,
>>
>
> Is there is any alternate way of making luaL_loadfile & luaL_dofile enforce
> relative path-names ?
>
You can do some string manipulation on package.path/package.cpath and
use them as a search path for relative-path given filenames. It's
definitely easier to write this in Lua, but totally doable in C.
wes