add file.path(...), file.join(...)

This commit is contained in:
MihailRis 2025-03-11 16:19:09 +03:00
parent e70746ae43
commit 9286f297c1

View File

@ -551,3 +551,15 @@ function file.parent(path)
end
return path:sub(0, pos-1)
end
function file.path(path)
local pos = path:find(':')
return path:sub(pos + 1)
end
function file.join(a, b)
if a[#a] == ':' then
return a .. b
end
return a .. "/" .. b
end