From 6ec1b47d5c92ba76ca5b78ff1c467312b6169c5d Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 30 Dec 2015 14:06:42 +0000 Subject: Change listfiles filesize to size, size and mtime not user-friendly, use posix.stat over fs.stat, use new format functions --- postgresql-listfiles-html.lsp | 18 ++---------------- postgresql-model.lua | 7 ++++--- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/postgresql-listfiles-html.lsp b/postgresql-listfiles-html.lsp index 6b7fc9c..11f904d 100644 --- a/postgresql-listfiles-html.lsp +++ b/postgresql-listfiles-html.lsp @@ -3,20 +3,6 @@ htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> -<% -function convertsize(size) - if string.find(size, "k$") then - return tonumber(string.match(size, "[%d.]*")) * 1024.0 - elseif string.find(size, "M$") then - return tonumber(string.match(size, "[%d.]*")) * 1024.0 * 1024.0 - elseif string.find(size, "G$") then - return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0 - else - return tonumber(string.match(size, "[%d.]*")) - end -end -%> -