diff options
author | Ted Trask <ttrask01@yahoo.com> | 2015-12-30 14:07:54 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-01-18 19:09:17 +0000 |
commit | 449bac6bb9fba18e97e5e7441f72b82f193fcf9d (patch) | |
tree | 5c6c4b3e5bee8f7f407e5c20fbf4f452b44c71a0 /provisioning-model.lua | |
parent | 168435d418b85cb776295e12fcae540a2ec1afa8 (diff) | |
download | acf-provisioning-449bac6bb9fba18e97e5e7441f72b82f193fcf9d.tar.bz2 acf-provisioning-449bac6bb9fba18e97e5e7441f72b82f193fcf9d.tar.xz |
Change file actions filesize to size, size and mtime not user-friendly, use posix.stat over fs.stat, use new format functions
Diffstat (limited to 'provisioning-model.lua')
-rw-r--r-- | provisioning-model.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua index 877a2b7..eac1623 100644 --- a/provisioning-model.lua +++ b/provisioning-model.lua @@ -571,7 +571,7 @@ mymodule.list_templates = function() fs.create_directory(baseurl) for f in posix.files(baseurl) do local file = baseurl..f - local details = fs.stat(file) + local details = posix.stat(file) if details.type == "regular" then if not reversed[file] then retval[#retval+1] = {filename=file} @@ -621,7 +621,7 @@ mymodule.get_template = function(self, clientdata) end end local filedetails = modelfunctions.getfiledetails(retval.filename.value, function(filename) return validator.is_valid_filename(filename, baseurl) end) - for i,n in ipairs({"filecontent", "filesize", "mtime"}) do + for i,n in ipairs({"filecontent", "size", "mtime"}) do retval[n] = filedetails.value[n] end @@ -2020,7 +2020,7 @@ end function mymodule.list_files() local retval = {} for i,file in ipairs(scriptfiles) do - local details = fs.stat(file) or {} + local details = posix.stat(file) or {} details.filename = file table.insert(retval, details) end |