2013-09-13 17:49:28 +00:00
|
|
|
{- git file modes
|
|
|
|
-
|
2015-01-21 16:50:09 +00:00
|
|
|
- Copyright 2013 Joey Hess <id@joeyh.name>
|
2013-09-13 17:49:28 +00:00
|
|
|
-
|
2019-03-13 19:48:14 +00:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2013-09-13 17:49:28 +00:00
|
|
|
-}
|
|
|
|
|
|
|
|
{-# LANGUAGE CPP #-}
|
|
|
|
|
|
|
|
module Git.FileMode where
|
|
|
|
|
|
|
|
import Utility.FileMode
|
|
|
|
|
2013-09-19 20:30:37 +00:00
|
|
|
symLinkMode :: FileMode
|
|
|
|
symLinkMode = 40960
|
|
|
|
|
2013-09-13 17:49:28 +00:00
|
|
|
{- 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
|
2013-09-19 20:30:37 +00:00
|
|
|
isSymLink = checkMode symLinkMode
|