sys.currentdir read/write property
The sys.currentdir property get or set a string representing the current working directory.
Example
-- check if the subdirectory \log exists in current working directory
local dir = sys.Directory(sys.currentdir.."\\log")
if not dir.exists then
error("Directory "..sys.currentdir.."\\log does not exist")
end