How do I save directory information from os.execute(“dir”) into a string?
snippet in lua

How do I save directory information from os.execute(“dir”) into a string?

user5867

local p = io.popen( "dir", "r" )
local output = p:read "*a"
p:close( )
-- and use output