mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 15:23:48 +01:00
Rename file.get_extension to file.split_extension
This commit is contained in:
parent
dc80e8b45c
commit
277c076651
6
file.lua
6
file.lua
@ -9,9 +9,11 @@ function get_name(filepath)
|
|||||||
assert(#modlib.dir_delim == 1)
|
assert(#modlib.dir_delim == 1)
|
||||||
return filepath:match(modlib.dir_delim .. "?(.-)$")
|
return filepath:match(modlib.dir_delim .. "?(.-)$")
|
||||||
end
|
end
|
||||||
function get_extension(filename)
|
function split_extension(filename)
|
||||||
return filename:match"(.*)%.(.*)$"
|
return filename:match"^(.*)%.(.*)$"
|
||||||
end
|
end
|
||||||
|
--! deprecated
|
||||||
|
get_extension = split_extension
|
||||||
|
|
||||||
function read(filename)
|
function read(filename)
|
||||||
local file = io.open(filename, "r")
|
local file = io.open(filename, "r")
|
||||||
|
Loading…
Reference in New Issue
Block a user