{-# LANGUAGE CPP #-}
module Development.IDE.Core.FileUtils(
getModTime,
) where
import Data.Time.Clock.POSIX
#ifdef mingw32_HOST_OS
import qualified System.Directory as Dir
#else
import System.Posix.Files (getFileStatus, modificationTimeHiRes)
#endif
getModTime :: FilePath -> IO POSIXTime
getModTime :: FilePath -> IO POSIXTime
getModTime FilePath
f =
#ifdef mingw32_HOST_OS
utcTimeToPOSIXSeconds <$> Dir.getModificationTime f
#else
FileStatus -> POSIXTime
modificationTimeHiRes forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> FilePath -> IO FileStatus
getFileStatus FilePath
f
#endif