mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
add file.remove_ext
This commit is contained in:
parent
089bcbbb64
commit
841c2a5d54
1 changed files with 4 additions and 0 deletions
|
|
@ -23,6 +23,10 @@ function file.parent(path)
|
||||||
return dir
|
return dir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function file.remove_ext(path)
|
||||||
|
return string.format("%s/%s", file.parent(path), file.stem(path))
|
||||||
|
end
|
||||||
|
|
||||||
function file.path(path)
|
function file.path(path)
|
||||||
local pos = path:find(':')
|
local pos = path:find(':')
|
||||||
return path:sub(pos + 1)
|
return path:sub(pos + 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue