X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcore%2Fluasrc%2Futil.lua;h=cd3534f4f10aa3f9ee164b1b01135310570b2655;hp=2f6cfad4c21a8f1e06e01a0343be4b9111946029;hb=50093ed3d97c763d344f8f6b7bf934e593a92178;hpb=76982655fa433edd885bbb80bbe74e82fca527e2 diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua index 2f6cfad4c..cd3534f4f 100644 --- a/libs/core/luasrc/util.lua +++ b/libs/core/luasrc/util.lua @@ -612,6 +612,13 @@ function execl(command) return data end +--- Returns the absolute path to LuCI base directory. +-- @return String containing the directory path +function libpath() + return luci.fs.dirname(require("luci.debug").__file__) +end + + -- -- Coroutine safe xpcall and pcall versions modified for Luci -- original version: