获取工作目录

文件操作 / 基本操作

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)