From 9286f297c1acddaf68c7bda70c2b568e08a9af3d Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 11 Mar 2025 16:19:09 +0300 Subject: [PATCH] add file.path(...), file.join(...) --- res/scripts/stdmin.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/res/scripts/stdmin.lua b/res/scripts/stdmin.lua index b62bd9cc..5e6ac294 100644 --- a/res/scripts/stdmin.lua +++ b/res/scripts/stdmin.lua @@ -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