add file.name(), file.stem() & add 'path' to pack info & add start_coroutine()

This commit is contained in:
MihailRis
2025-01-05 22:44:32 +03:00
parent c51a7e0153
commit 136c35591c
14 changed files with 147 additions and 70 deletions
+13
View File
@@ -361,3 +361,16 @@ function __vc_warning(msg, detail, n)
"core:warning", msg, detail, debug.get_traceback(1 + (n or 0)))
end
end
function file.name(path)
return path:match("([^:/\\]+)$")
end
function file.stem(path)
local name = file.name(path)
return name:match("(.+)%.[^%.]+$") or name
end
function file.ext(path)
return path:match("%.([^:/\\]+)$")
end