Getting the working directory

Files / Basic operations

local lfs = require("lfs")

-- The standard library has no function for it:
-- the lfs module gives the working directory
local path = lfs.currentdir()
-- path = /tmp/work

print("path = " .. path)