unixpath

function unixpath( path ) --> upath

Description

Converts a path to the unix style version.

Parameters

path

A unix or windows style path.

Return Values

upath

A unix style version of the path.

Code

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

return unixpath

Examples

local t = require( "taptest" )
local unixpath = require( "unixpath" )

t( unixpath[[C:\a\b\c]], "C:/a/b/c" )

t()

See also