<% local view, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% function convertsize(size) if string.find(size, "k$") then return tonumber(string.match(size, "%d*")) * 1024 elseif string.find(string.match(size, "%d*"), "M$") then return tonumber(size) * 1024 * 1024 elseif string.find(size, "G$") then return tonumber(string.match(size, "%d*")) + 1024 * 1024 * 1024 else return tonumber(size) end end %> <% htmlviewfunctions.displaycommandresults({"editfile"}, session) %>

File List

<% for k,v in ipairs( view.value ) do io.write( "\n" ) end %>
File Size Last Modified
" .. html.html_escape(v.filename) .. ''..convertsize(v.size).."b" .. html.html_escape(v.size) .."" .. html.html_escape(v.mtime) .."