summaryrefslogtreecommitdiff
path: root/Git/FileMode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/FileMode.hs')
-rw-r--r--Git/FileMode.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Git/FileMode.hs b/Git/FileMode.hs
new file mode 100644
index 000000000..d42df9833
--- /dev/null
+++ b/Git/FileMode.hs
@@ -0,0 +1,20 @@
+{- git file modes
+ -
+ - Copyright 2013 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# LANGUAGE CPP #-}
+
+module Git.FileMode where
+
+import Utility.FileMode
+
+import System.PosixCompat.Types
+
+{- Git uses a special file mode to indicate a symlink. This is the case
+ - even on Windows, so we hard code the valuse here, rather than using
+ - System.Posix.Files.symbolicLinkMode. -}
+isSymLink :: FileMode -> Bool
+isSymLink = checkMode 40960