</head>
<body>
<%
- require("luci.fs")
+ require("nixio.fs")
+ require("nixio.util")
require("luci.http")
require("luci.dispatcher")
end
local filepath = table.concat( path, '/' )
- local filestat = luci.fs.stat( filepath )
+ local filestat = nixio.fs.stat( filepath )
local baseurl = luci.dispatcher.build_url('admin', 'filebrowser')
if filestat and filestat.type == "reg" then
filepath = filepath .. '/'
end
- local entries = luci.fs.dir(filepath)
+ local entries = nixio.util.consume((nixio.fs.dir(filepath)))
-%>
<div id="path">
Location:
<div id="listing">
<ul>
<% for _, e in luci.util.vspairs(entries) do
- local stat = luci.fs.stat(filepath..e)
- if e ~= '.' and e ~= '..' and stat and stat.type == 'dir' then
+ local stat = nixio.fs.stat(filepath..e)
+ if stat and stat.type == 'dir' then
-%>
<li class="dir">
<img src="/luci-static/resources/cbi/folder.png" alt="Directory" />
<% end end -%>
<% for _, e in luci.util.vspairs(entries) do
- local stat = luci.fs.stat(filepath..e)
+ local stat = nixio.fs.stat(filepath..e)
if stat and stat.type ~= 'dir' then
-%>
<li class="file">