Re: lua source as config file
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lua source as config file
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 8 Feb 2007 17:12:26 -0200
> local aFile, aStatus = io.open( aPath, "rb" )
> local aContent = aFile:read( "*all" )
> local aChunk, aStatus = loadstring( aContent )
No need to read the file into memory:
local aChunk, aStatus = loadfile( aPath )
--lhf