[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:59:50 UTC 2010


The following commit has been merged in the master branch:
commit 93c1406fe3aa2465543a7576a4e453e892a4d2d7
Author: John Goerzen <jgoerzen at complete.org>
Date:   Fri Jul 22 20:17:51 2005 +0100

    Added a stat support for Windws

diff --git a/MissingH/IO/WindowsCompat.hs b/MissingH/IO/WindowsCompat.hs
index fc5c356..c324f4e 100644
--- a/MissingH/IO/WindowsCompat.hs
+++ b/MissingH/IO/WindowsCompat.hs
@@ -108,8 +108,18 @@ getFileStatus fp =
        isdir <- doesDirectoryExist
        perms <- getPermissions fp
        modct <- getModificationTime fp
+       epochtime <- timelocal modct
        return $ FileStatusCompat {deviceID = -1,
                                   fileID = -1,
-                                  fileMode = 
-
+                                  fileMode = if isfile then regularFileMode
+                                                       else directoryMode,
+                                  linkCount = 1,
+                                  fileOwner = 0,
+                                  fileGroup = 0,
+                                  specialDeviceID = -1,
+                                  fileSize = 0, -- fixme: hFileSize?
+                                  accessTime = fromInteger epochtime,
+                                  modificationTime = fromInteger epochtime,
+                                  statusChangeTime = fromInteger epochtime
+                                 }
 #endif

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list