this is it:
–
local function readSnapData( event ) – chg ( userInput ) to ( event )?
pathSnapAOpenRead, errorStringpathSnapAOpenRead = io.open( pathSnapA , “r” ) – open for read
if not pathSnapAOpenRead then
– Error; output cause
print( "File error: " … errorStringpathSnapAOpenRead ) – DEBUGmrp
else
– Grab lines & stick in to table
index = 0 – start index at zero then increment inside loop to correct start value (1)
for line in pathSnapAOpenRead:lines() do
if line then
index = index + 1 – increment to get correct table index
snapTable[“index”] = line
else
print( "data not found in file pathSnapA ", pathSnapA )
print( "capture new user inputs to populate snap-shot file ", pathSnapA )
end
end
– Close the file – move to end of processing; final tasks section
– io.close( pathSnapAOpenRead ) – close file / handle
– return true
end
– put at end w/ final tasks pathSnapAOpenRead = nil – release memory allocation for file handle
end
– --------------------------------------------------------------------------