Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ModTime = ModTime Word64
- getModTime :: FilePath -> IO ModTime
- getFileAge :: FilePath -> IO Double
- getCurTime :: IO ModTime
- posixSecondsToModTime :: Int64 -> ModTime
- calibrateMtimeChangeDelay :: IO (Int, Int)
Documentation
An opaque type representing a file's modification time, represented internally as a 64-bit unsigned integer in the Windows UTC format.
Instances
Structured ModTime Source # | |
Defined in Distribution.Compat.Time structure :: Proxy ModTime -> Structure structureHash' :: Tagged ModTime MD5 | |
Bounded ModTime Source # | |
Generic ModTime Source # | |
Read ModTime Source # | |
Show ModTime Source # | |
Binary ModTime Source # | |
Eq ModTime Source # | |
Ord ModTime Source # | |
type Rep ModTime Source # | |
Defined in Distribution.Compat.Time |
getModTime :: FilePath -> IO ModTime Source #
Return modification time of the given file. Works around the low clock
resolution problem that getModificationTime
has on GHC < 7.8.
This is a modified version of the code originally written for Shake by Neil Mitchell. See module Development.Shake.FileInfo.
posixSecondsToModTime :: Int64 -> ModTime Source #
Convert POSIX seconds to ModTime.
calibrateMtimeChangeDelay :: IO (Int, Int) Source #
Based on code written by Neil Mitchell for Shake. See
sleepFileTimeCalibrate
in Type
. Returns a pair
of microsecond values: first, the maximum delay seen, and the
recommended delay to use before testing for file modification change.
The returned delay is never smaller
than 10 ms, but never larger than 1 second.