mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add file.name(), file.stem() & add 'path' to pack info & add start_coroutine()
This commit is contained in:
parent
c51a7e0153
commit
136c35591c
14 changed files with 147 additions and 70 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue