projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
convert luci.fs users to nixio.fs api
[project/luci.git]
/
libs
/
cbi
/
luasrc
/
view
/
cbi
/
filebrowser.htm
diff --git
a/libs/cbi/luasrc/view/cbi/filebrowser.htm
b/libs/cbi/luasrc/view/cbi/filebrowser.htm
index
5eda993
..
f829572
100644
(file)
--- a/
libs/cbi/luasrc/view/cbi/filebrowser.htm
+++ b/
libs/cbi/luasrc/view/cbi/filebrowser.htm
@@
-48,7
+48,8
@@
$Id$
</head>
<body>
<%
</head>
<body>
<%
- require("luci.fs")
+ require("nixio.fs")
+ require("nixio.util")
require("luci.http")
require("luci.dispatcher")
require("luci.http")
require("luci.dispatcher")
@@
-63,7
+64,7
@@
$Id$
end
local filepath = table.concat( path, '/' )
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
local baseurl = luci.dispatcher.build_url('admin', 'filebrowser')
if filestat and filestat.type == "reg" then
@@
-76,7
+77,7
@@
$Id$
filepath = filepath .. '/'
end
filepath = filepath .. '/'
end
- local entries =
luci.fs.dir(filepath
)
+ local entries =
nixio.util.consume((nixio.fs.dir(filepath))
)
-%>
<div id="path">
Location:
-%>
<div id="path">
Location:
@@
-98,8
+99,8
@@
$Id$
<div id="listing">
<ul>
<% for _, e in luci.util.vspairs(entries) do
<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" />
-%>
<li class="dir">
<img src="/luci-static/resources/cbi/folder.png" alt="Directory" />
@@
-108,7
+109,7
@@
$Id$
<% end end -%>
<% for _, e in luci.util.vspairs(entries) do
<% 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">
if stat and stat.type ~= 'dir' then
-%>
<li class="file">