From 841c2a5d543fc53a8c0539c60420287c3d7d9bd6 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 4 Jun 2026 20:40:42 +0300 Subject: [PATCH] add file.remove_ext --- res/modules/internal/extensions/file.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/res/modules/internal/extensions/file.lua b/res/modules/internal/extensions/file.lua index 0f1040128..d308eda9c 100644 --- a/res/modules/internal/extensions/file.lua +++ b/res/modules/internal/extensions/file.lua @@ -23,6 +23,10 @@ function file.parent(path) return dir end +function file.remove_ext(path) + return string.format("%s/%s", file.parent(path), file.stem(path)) +end + function file.path(path) local pos = path:find(':') return path:sub(pos + 1)