1
0
Fork 0

.bam/path.lua: Adding ModuleRelative()

This commit is contained in:
Henrik Hautakoski 2022-09-12 19:55:34 +02:00
parent c2c201c9e4
commit c83337b6a6

View file

@ -4,6 +4,11 @@ function ModuleDir()
return PathDir(ModuleFilename())
end
-- Strip ModuleDir() of the beginning of path
function ModuleRelative(path)
return string.gsub(path, "^" .. ModuleDir() .. "/", "")
end
-- Make the path relative to the current working directory
-- and ModuleDir()
function RelPath(path)