access-time 0.1 → 0.1.0.1
raw patch · 2 files changed
+8/−6 lines, 2 filesdep ~time
Dependency ranges changed: time
Files
- System/Directory/AccessTime.hs +6/−4
- access-time.cabal +2/−2
System/Directory/AccessTime.hs view
@@ -58,13 +58,14 @@ ctIsDST = error "Documented as ignored: ctIsDST" } --- See <http://msdn.microsoft.com/en-us/library/ms724320(v=vs.85).aspx>: FAT access time has a resolution of 1 day,--- NTFS access time has a resolution of one hour.+-- See <http://msdn.microsoft.com/en-us/library/ms724320(v=vs.85).aspx>: FAT access time has a resolution of 1 day.+-- NTFS access time *may have updates delayed by up to one hour* but apparently stores a very high resolution value.+-- Let's say that it is one second. -- -- If neither of those cases seem to apply, we assume a 1 second resolution getAccessTimeResolution fp = do fs <- getVolumeFileSystem (takeDrive fp)- return $ case fs of "NTFS" -> noTimeDiff { tdHour = 1 }+ return $ case fs of "NTFS" -> noTimeDiff { tdSec = 1 } 'F':'A':'T':_ -> noTimeDiff { tdDay = 1 } _ -> noTimeDiff { tdSec = 1 } @@ -105,5 +106,6 @@ getAccessTime :: FilePath -> IO ClockTime -- | Approximate resolution of access times on your system for the given file or directory.--- Presently this will not attempt to determine whether access times are enabled on the relevant file system.+--+-- Presently this will not attempt to determine whether access times are actually enabled on the relevant file system. getAccessTimeResolution :: FilePath -> IO TimeDiff
access-time.cabal view
@@ -1,5 +1,5 @@ Name: access-time-Version: 0.1+Version: 0.1.0.1 Cabal-Version: >= 1.6 Category: System Synopsis: Cross-platform support for retrieving file access times@@ -27,4 +27,4 @@ Build-Depends: unix >= 2.3 && < 2.5 Cpp-Options: -DUNIX - Build-Depends: base >= 3 && < 5, old-time >= 1.0 && < 1.1, time >= 1.1 && < 1.3, filepath >= 1.1 && < 1.3+ Build-Depends: base >= 3 && < 5, old-time >= 1.0 && < 1.1, time >= 1.1 && < 1.5, filepath >= 1.1 && < 1.3