summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-07-19 00:24:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-07-19 00:24:58 +0000
commit8fcd841aa9af96c8a4a4d3c1a555d2d1ed42332c (patch)
treecf6466b373236442e63742cb4f73b22579940784 /libs/web/luasrc/dispatcher.lua
parent6abba6163290b58cd9ebae98d8459ac38ef52a4b (diff)
convert luci.fs users to nixio.fs api
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 8fddf02122..37008b5946 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -25,7 +25,7 @@ limitations under the License.
]]--
--- LuCI web dispatcher.
-local fs = require "luci.fs"
+local fs = require "nixio.fs"
local sys = require "luci.sys"
local init = require "luci.init"
local util = require "luci.util"
@@ -394,19 +394,16 @@ end
function createindex_plain(path, suffixes)
local controllers = { }
for _, suffix in ipairs(suffixes) do
- controllers = util.combine(
- controllers,
- luci.fs.glob(path .. "*" .. suffix) or {},
- luci.fs.glob(path .. "*/*" .. suffix) or {}
- )
+ nixio.util.consume((fs.glob(path .. "*" .. suffix)), controllers)
+ nixio.util.consume((fs.glob(path .. "*/*" .. suffix)), controllers)
end
if indexcache then
- local cachedate = fs.mtime(indexcache)
+ local cachedate = fs.stat(indexcache, "mtime")
if cachedate then
local realdate = 0
for _, obj in ipairs(controllers) do
- local omtime = fs.mtime(path .. "/" .. obj)
+ local omtime = fs.stat(path .. "/" .. obj, "mtime")
realdate = (omtime and omtime > realdate) and omtime or realdate
end