From ff9d1c9d954c69c926c7dfc2acb7d6c03265c417 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 6 Nov 2021 18:32:58 +0100 Subject: [PATCH] Add file.split_path --- file.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/file.lua b/file.lua index 8f2b9a6..73d7aa4 100644 --- a/file.lua +++ b/file.lua @@ -18,6 +18,12 @@ end --! deprecated get_extension = split_extension +function split_path(filepath) + return modlib.text.split(filepath, dir_delim) +end + +-- concat_path is set by init.lua to avoid code duplication + function read(filename) local file = io.open(filename, "r") if file == nil then return nil end