lua-users home
lua-l archive

Re: lua source as config file

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


> 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

AltStyle によって変換されたページ (->オリジナル) /