currentdir

function currentdir() --> path

Description

Returns the current working directory with unix style slashes in the path.

Return Values

path

Path to the current working directory.

Code

local lfs = require( "lfs" ) --ZREQ-lfs

--ZFUNC-currentdir-v1
local function currentdir() --> path
   --ZFUNC-unixpath-v1
   local function unixpath( path )
      return path:gsub( "\\", "/" )
   end

   local path = lfs.currentdir()
   return unixpath( path )
end

return currentdir