touch files with high-resolution timestamp
Needs unix 2.7.2, but that was included in ghc 8.0.1 (and much older) so not really a new dep.
This commit is contained in:
parent
94b7968f1f
commit
5d97898a7c
5 changed files with 19 additions and 26 deletions
|
@ -39,6 +39,7 @@ module Utility.InodeCache (
|
|||
|
||||
import Common
|
||||
import System.PosixCompat.Types
|
||||
import Data.Time.Clock.POSIX
|
||||
import Utility.QuickCheck
|
||||
|
||||
#ifdef mingw32_HOST_OS
|
||||
|
@ -90,8 +91,8 @@ instance Eq InodeCacheKey where
|
|||
inodeCacheToKey :: InodeComparisonType -> InodeCache -> InodeCacheKey
|
||||
inodeCacheToKey ct (InodeCache prim) = InodeCacheKey ct prim
|
||||
|
||||
inodeCacheToMtime :: InodeCache -> EpochTime
|
||||
inodeCacheToMtime (InodeCache (InodeCachePrim _ _ mtime)) = mtime
|
||||
inodeCacheToMtime :: InodeCache -> POSIXTime
|
||||
inodeCacheToMtime (InodeCache (InodeCachePrim _ _ mtime)) = realToFrac mtime
|
||||
|
||||
showInodeCache :: InodeCache -> String
|
||||
showInodeCache (InodeCache (InodeCachePrim inode size mtime)) = unwords
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue