File Info tidy up:

1. Fix the "Created" field in file info to say "Status changed" as the ctime has nothing to do with creation of a file but with the time of the last modification to its inode (e.g. owner, group, link count, mode, etc.)
2. Added the field "Accessed" which shows the atime.
This commit is contained in:
Tigran Aivazian
2012-09-20 00:06:08 +01:00
parent e5c859059d
commit b8e29b77bc

View File

@@ -73,10 +73,12 @@ function FileInfo:init(path, fname)
info_entry = {dir = "Free space", name = FileInfo:FormatSize(util.df("."))}
table.insert(self.result, info_entry)
info_entry = {dir = "Created", name = FileInfo:FileCreated(self.pathfile, "change")}
info_entry = {dir = "Status changed", name = FileInfo:FileCreated(self.pathfile, "change")}
table.insert(self.result, info_entry)
info_entry = {dir = "Modified", name = FileInfo:FileCreated(self.pathfile, "modification")}
table.insert(self.result, info_entry)
info_entry = {dir = "Accessed", name = FileInfo:FileCreated(self.pathfile, "access")}
table.insert(self.result, info_entry)
-- if the document was already opened
local history = DocToHistory(self.pathfile)