GTK: implement fileinfo dialog wrt #32

This commit is contained in:
2016-04-19 21:05:29 +02:00
parent a7ba20ae00
commit a61b409486
6 changed files with 298 additions and 38 deletions

View File

@@ -563,9 +563,17 @@ getFreeVar _ = Nothing
-- |Pack the modification time into a string.
packModTime :: File FileInfo
-> String
packModTime =
fromFreeVar
$ show . posixSecondsToUTCTime . realToFrac . modificationTime
packModTime = fromFreeVar $ epochToString . modificationTime
-- |Pack the modification time into a string.
packAccessTime :: File FileInfo
-> String
packAccessTime = fromFreeVar $ epochToString . accessTime
epochToString :: EpochTime -> String
epochToString = show . posixSecondsToUTCTime . realToFrac
-- |Pack the permissions into a string, similar to what "ls -l" does.